Package gnu.text

Class SourceLocator.Simple

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String filename  
      protected long position  
    • Constructor Summary

      Constructors 
      Constructor Description
      Simple()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getColumnNumber()
      Return current column number.
      int getEndColumn()
      Column (one-origin) of end of range; unknown/unspecified is -1.
      int getEndLine()
      Line number (one-origin) of end of range; unknown/unspecified is -1.
      java.lang.String getFileName()
      Normally same as getSystemId.
      int getLineNumber()
      Return current line number.
      java.lang.String getPublicId()  
      int getStartColumn()
      Column (one-origin) of start of range; unknown/unspecified is -1.
      int getStartLine()
      Line number (one-origin) of start of range; unknown/unspecified is -1.
      java.lang.String getSystemId()  
      boolean isRepl()  
      boolean isStableSourceLocation()
      True if position is unlikely to change.
      void setFile​(java.lang.String filename)  
      void setLine​(int lineno)  
      void setLine​(int lineno, int colno)  
      void setLine​(java.lang.String filename, int line, int column)  
      void setLocation​(SourceLocator location)  
      • Methods inherited from class java.lang.Object

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

      • filename

        protected java.lang.String filename
      • position

        protected long position
    • Constructor Detail

      • Simple

        public Simple()
    • Method Detail

      • getFileName

        public java.lang.String getFileName()
        Description copied from interface: SourceLocator
        Normally same as getSystemId.
        Specified by:
        getFileName in interface SourceLocator
      • isRepl

        public boolean isRepl()
      • getPublicId

        public java.lang.String getPublicId()
        Specified by:
        getPublicId in interface org.xml.sax.Locator
        Specified by:
        getPublicId in interface SourceLocator
        Specified by:
        getPublicId in interface javax.xml.transform.SourceLocator
      • getSystemId

        public java.lang.String getSystemId()
        Specified by:
        getSystemId in interface org.xml.sax.Locator
        Specified by:
        getSystemId in interface SourceLocator
        Specified by:
        getSystemId in interface javax.xml.transform.SourceLocator
      • getLineNumber

        public int getLineNumber()
        Description copied from interface: SourceLocator
        Return current line number. Normally the same as getStartLine(). The "first" line is line 1; unknown is -1.
        Specified by:
        getLineNumber in interface org.xml.sax.Locator
        Specified by:
        getLineNumber in interface SourceLocator
        Specified by:
        getLineNumber in interface javax.xml.transform.SourceLocator
      • getColumnNumber

        public int getColumnNumber()
        Description copied from interface: SourceLocator
        Return current column number. Normally the same as getStartColumn(). The "first" column is column 1; unknown is -1.
        Specified by:
        getColumnNumber in interface org.xml.sax.Locator
        Specified by:
        getColumnNumber in interface SourceLocator
        Specified by:
        getColumnNumber in interface javax.xml.transform.SourceLocator
      • getStartLine

        public int getStartLine()
        Description copied from interface: SourceLocator
        Line number (one-origin) of start of range; unknown/unspecified is -1.
        Specified by:
        getStartLine in interface SourceLocator
      • getStartColumn

        public int getStartColumn()
        Description copied from interface: SourceLocator
        Column (one-origin) of start of range; unknown/unspecified is -1.
        Specified by:
        getStartColumn in interface SourceLocator
      • getEndLine

        public int getEndLine()
        Description copied from interface: SourceLocator
        Line number (one-origin) of end of range; unknown/unspecified is -1.
        Specified by:
        getEndLine in interface SourceLocator
      • getEndColumn

        public int getEndColumn()
        Description copied from interface: SourceLocator
        Column (one-origin) of end of range; unknown/unspecified is -1.
        Specified by:
        getEndColumn in interface SourceLocator
      • isStableSourceLocation

        public boolean isStableSourceLocation()
        Description copied from interface: SourceLocator
        True if position is unlikely to change. True for an expression but not an input file.
        Specified by:
        isStableSourceLocation in interface SourceLocator
      • setFile

        public void setFile​(java.lang.String filename)
      • setLine

        public void setLine​(java.lang.String filename,
                            int line,
                            int column)
      • setLine

        public void setLine​(int lineno,
                            int colno)
      • setLine

        public void setLine​(int lineno)
      • setLocation

        public void setLocation​(SourceLocator location)