public class AngularTemplateInspector extends LineInspector
An AngularJS support that detects template URL.
A template is not considered as a sub resource as angular loads it only when needed.
LineInspector.ReplacementInfoSTRING_LITERAL_REGEX| Constructor and Description |
|---|
AngularTemplateInspector(String wrapPattern)
Builds a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
List<? extends ConvertibleNut> |
appendTransformation(Matcher matcher,
StringBuilder replacement,
EngineRequest request,
CompositeNut.CompositeInputStream cis,
ConvertibleNut originalNut)
Computes the replacement to be made inside the text for the given
Matcher which its find()
method as just been called. |
protected String |
toString(ConvertibleNut convertibleNut)
Converts the given
ConvertibleNut to a String representation that is possible to append directly
to the referencer. |
fallbackToVersionNumberInQueryString, getHeap, getPattern, manageAppend, replacementInfopublic AngularTemplateInspector(String wrapPattern)
Builds a new instance.
wrapPattern - a regex describing a pattern wrapping the URL, could be nullpublic List<? extends ConvertibleNut> appendTransformation(Matcher matcher, StringBuilder replacement, EngineRequest request, CompositeNut.CompositeInputStream cis, ConvertibleNut originalNut) throws WuicException
Computes the replacement to be made inside the text for the given Matcher which its find()
method as just been called.
appendTransformation in class LineInspectormatcher - the matcher which provides found text thanks to its group() method.replacement - the text which will replace the matching textrequest - the request that orders this transformationcis - a composite stream which indicates what nut owns the transformed text, null if the nut is not a compositionoriginalNut - the original nutnull if the inspector did not perform any changeWuicException - if an exception occursprotected String toString(ConvertibleNut convertibleNut) throws IOException
Converts the given ConvertibleNut to a String representation that is possible to append directly
to the referencer. This could be used as an alternative to URL statements.
toString in class LineInspectorconvertibleNut - the convertible nut to convertString representation, null if no inclusion is possibleIOException - if the transformation failsCopyright © 2012-2015. All Rights Reserved.