Class StylesheetFactoryImpl

  • All Implemented Interfaces:
    StylesheetFactory

    public class StylesheetFactoryImpl
    extends java.lang.Object
    implements StylesheetFactory
    A Factory class for Cascading Style Sheets. Sheets are parsed using a single parser instance for all sheets. Sheets are cached by URI using a LRU test, but timestamp of file is not checked.
    • Field Detail

      • _userAgentCallback

        private UserAgentCallback _userAgentCallback
        the UserAgentCallback to resolve uris
      • _seenStylesheetUris

        private final java.util.Map<java.lang.String,​java.lang.Integer> _seenStylesheetUris
        This may avoid @import loops, ie. one.css includes two.css which then includes one.css.
      • MAX_STYLESHEET_INCLUDES

        private static final int MAX_STYLESHEET_INCLUDES
        The maximum number of times a stylesheet uri can be link or imported before we give up and conclude there is a loop.
        See Also:
        Constant Field Values
      • _cssParser

        private final CSSParser _cssParser
    • Constructor Detail

      • StylesheetFactoryImpl

        public StylesheetFactoryImpl​(UserAgentCallback userAgentCallback)