Class TagScanner

  • All Implemented Interfaces:
    java.io.Serializable, Scanner
    Direct Known Subclasses:
    CompositeTagScanner, JspScanner

    public class TagScanner
    extends java.lang.Object
    implements Scanner, java.io.Serializable
    TagScanner is an abstract superclass, subclassed to create specific scanners. When asked to scan the tag, this class does nothing other than perform the tag's semantic action. Use TagScanner when you have a meta task to do like setting the BASE url for the page when a BASE tag is encountered. If you want to match end tags and handle special syntax between tags, then you'll probably want to subclass CompositeTagScanner instead.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      TagScanner()
      Create a (non-composite) tag scanner.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Tag scan​(Tag tag, Lexer lexer, NodeList stack)
      Scan the tag.
      • Methods inherited from class java.lang.Object

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

      • TagScanner

        public TagScanner()
        Create a (non-composite) tag scanner.
    • Method Detail

      • scan

        public Tag scan​(Tag tag,
                        Lexer lexer,
                        NodeList stack)
                 throws ParserException
        Scan the tag. For this implementation, the only operation is to perform the tag's semantic action.
        Specified by:
        scan in interface Scanner
        Parameters:
        tag - The tag to scan.
        lexer - Provides html page access.
        stack - The parse stack. May contain pending tags that enclose this tag.
        Returns:
        The resultant tag (may be unchanged).
        Throws:
        ParserException - if an unrecoverable problem occurs.