Class Mark


  • final class Mark
    extends java.lang.Object
    Mark represents a point in the JSP input.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      (package private) class  Mark.IncludeState
      Keep track of parser before parsing an included file.
    • Constructor Summary

      Constructors 
      Constructor Description
      Mark​(JspReader reader, char[] inStream, int fileid, java.lang.String name, java.lang.String inBaseDir, java.lang.String inEncoding)
      Constructor
      Mark​(Mark other)
      Constructor
      Mark​(JspCompilationContext ctxt, java.lang.String filename, int line, int col)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object other)  
      int getColumnNumber()  
      java.lang.String getFile()  
      int getLineNumber()  
      java.lang.String getPublicId()  
      java.lang.String getSystemId()  
      java.net.URL getURL()
      Gets the URL of the resource with which this Mark is associated
      boolean isGreater​(Mark other)  
      Mark popStream()
      /* Restores this mark's state to a previously stored stream.
      void pushStream​(char[] inStream, int inFileid, java.lang.String name, java.lang.String inBaseDir, java.lang.String inEncoding)
      Sets this mark's state to a new stream.
      java.lang.String toShortString()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • cursor

        int cursor
      • line

        int line
      • col

        int col
      • fileid

        int fileid
      • fileName

        java.lang.String fileName
      • baseDir

        java.lang.String baseDir
      • stream

        char[] stream
      • encoding

        java.lang.String encoding
    • Constructor Detail

      • Mark

        Mark​(JspReader reader,
             char[] inStream,
             int fileid,
             java.lang.String name,
             java.lang.String inBaseDir,
             java.lang.String inEncoding)
        Constructor
        Parameters:
        reader - JspReader this mark belongs to
        inStream - current stream for this mark
        fileid - id of requested jsp file
        name - JSP file name
        inBaseDir - base directory of requested jsp file
        inEncoding - encoding of current file
      • Mark

        Mark​(Mark other)
        Constructor
    • Method Detail

      • pushStream

        public void pushStream​(char[] inStream,
                               int inFileid,
                               java.lang.String name,
                               java.lang.String inBaseDir,
                               java.lang.String inEncoding)
        Sets this mark's state to a new stream. It will store the current stream in it's includeStack.
        Parameters:
        inStream - new stream for mark
        inFileid - id of new file from which stream comes from
        inBaseDir - directory of file
        inEncoding - encoding of new file
      • popStream

        public Mark popStream()
        /* Restores this mark's state to a previously stored stream.
        Returns:
        null if there is no previous stream The previous Makr instance when the stream is pushed.
      • getLineNumber

        public int getLineNumber()
      • getColumnNumber

        public int getColumnNumber()
      • getSystemId

        public java.lang.String getSystemId()
      • getPublicId

        public java.lang.String getPublicId()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getFile

        public java.lang.String getFile()
      • getURL

        public java.net.URL getURL()
                            throws java.net.MalformedURLException
        Gets the URL of the resource with which this Mark is associated
        Returns:
        URL of the resource with which this Mark is associated
        Throws:
        java.net.MalformedURLException - if the resource pathname is incorrect
      • toShortString

        public java.lang.String toShortString()
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • isGreater

        public boolean isGreater​(Mark other)
        Returns:
        true if this Mark is greather than the other Mark, false otherwise.