Class CssLinkResourceTransformer.AbstractLinkParser
- java.lang.Object
- org.springframework.web.servlet.resource.CssLinkResourceTransformer.AbstractLinkParser
- All Implemented Interfaces:
CssLinkResourceTransformer.LinkParser
- Enclosing class:
- CssLinkResourceTransformer
protected abstract static class CssLinkResourceTransformer.AbstractLinkParser extends Object implements CssLinkResourceTransformer.LinkParser
Abstract base class forCssLinkResourceTransformer.LinkParserimplementations.
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractLinkParser()
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected intextractLink(int index, String endKey, String content, SortedSet<org.springframework.web.servlet.resource.CssLinkResourceTransformer.ContentChunkInfo> linksToAdd)protected abstract intextractLink(int index, String content, SortedSet<org.springframework.web.servlet.resource.CssLinkResourceTransformer.ContentChunkInfo> linksToAdd)Invoked after a keyword match, after whitespace has been removed, and when the next char is neither a single nor double quote.protected abstract StringgetKeyword()Return the keyword to use to search for links, e.g.voidparse(String content, SortedSet<org.springframework.web.servlet.resource.CssLinkResourceTransformer.ContentChunkInfo> result)
Constructor Detail
AbstractLinkParser
protected AbstractLinkParser()
Method Detail
getKeyword
protected abstract String getKeyword()
Return the keyword to use to search for links, e.g. "@import", "url("
parse
public void parse(String content, SortedSet<org.springframework.web.servlet.resource.CssLinkResourceTransformer.ContentChunkInfo> result)
- Specified by:
parsein interfaceCssLinkResourceTransformer.LinkParser
extractLink
protected int extractLink(int index, String endKey, String content, SortedSet<org.springframework.web.servlet.resource.CssLinkResourceTransformer.ContentChunkInfo> linksToAdd)
extractLink
protected abstract int extractLink(int index, String content, SortedSet<org.springframework.web.servlet.resource.CssLinkResourceTransformer.ContentChunkInfo> linksToAdd)
Invoked after a keyword match, after whitespace has been removed, and when the next char is neither a single nor double quote.