Class EmptyLocator

  • All Implemented Interfaces:
    Locator

    public final class EmptyLocator
    extends java.lang.Object
    implements Locator
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static Locator INSTANCE  
    • Constructor Summary

      Constructors 
      Constructor Description
      EmptyLocator()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getColumnNumber()
      Returns the column number for the sink event (starting from 1).
      int getLineNumber()
      Returns the line number for the sink event (starting from 1).
      java.lang.String getReference()
      Returns the underlying source reference (for file based documents a relative file path, otherwise an arbitrary string or null).
      • Methods inherited from class java.lang.Object

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

      • INSTANCE

        public static final Locator INSTANCE
    • Constructor Detail

      • EmptyLocator

        public EmptyLocator()
    • Method Detail

      • getLineNumber

        public int getLineNumber()
        Description copied from interface: Locator
        Returns the line number for the sink event (starting from 1). If it is not known returns -1.
        Specified by:
        getLineNumber in interface Locator
        Returns:
        the line number for the sink event
      • getColumnNumber

        public int getColumnNumber()
        Description copied from interface: Locator
        Returns the column number for the sink event (starting from 1). If it is not known returns -1.
        Specified by:
        getColumnNumber in interface Locator
        Returns:
        the column number for the sink event
      • getReference

        public java.lang.String getReference()
        Description copied from interface: Locator
        Returns the underlying source reference (for file based documents a relative file path, otherwise an arbitrary string or null).
        Specified by:
        getReference in interface Locator
        Returns:
        the source for the sink event (may be null)