Class CssLinkResourceTransformer.AbstractLinkParser

java.lang.Object
org.springframework.web.reactive.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 for CssLinkResourceTransformer.LinkParser implementations.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected int
    extractLink(int index, char endChar, String content, Set<org.springframework.web.reactive.resource.CssLinkResourceTransformer.ContentChunkInfo> result)
     
    protected abstract int
    extractUnquotedLink(int position, String content, Set<org.springframework.web.reactive.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 String
    Return the keyword to use to search for links, e.g.
    void
    parse(String content, SortedSet<org.springframework.web.reactive.resource.CssLinkResourceTransformer.ContentChunkInfo> result)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AbstractLinkParser

      protected AbstractLinkParser()
  • Method Details

    • 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.reactive.resource.CssLinkResourceTransformer.ContentChunkInfo> result)
      Specified by:
      parse in interface CssLinkResourceTransformer.LinkParser
    • extractLink

      protected int extractLink(int index, char endChar, String content, Set<org.springframework.web.reactive.resource.CssLinkResourceTransformer.ContentChunkInfo> result)
    • extractUnquotedLink

      protected abstract int extractUnquotedLink(int position, String content, Set<org.springframework.web.reactive.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.