Class ObjectLocation

java.lang.Object
com.pnfsoftware.jeb.core.output.text.ObjectLocation
All Implemented Interfaces:
IObjectLocation

public class ObjectLocation extends Object implements IObjectLocation
Simple implementation of IObjectLocation.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
     
    int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ObjectLocation(Object object, int depth, int lineBegin, int columnBegin)
    Create a location starting at the provided coordinates.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Get the first column of the object's textual range.
    int
    Get the end column of the object's textual range.
    int
    Get the optional nesting depth associated with this location.
    int
    Get the first line of the object's textual range.
    int
    Get the last line of the object's textual range.
    Get the represented object.
    void
    setEnd(int lineEnd, int columnEnd)
    Set the inclusive end line and exclusive end column of the represented range.

    Methods inherited from class java.lang.Object

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

    • lineBegin

      public int lineBegin
    • lineEnd

      public int lineEnd
  • Constructor Details

    • ObjectLocation

      public ObjectLocation(Object object, int depth, int lineBegin, int columnBegin)
      Create a location starting at the provided coordinates.
      Parameters:
      object - represented object
      depth - optional nesting depth used by some producers
      lineBegin - inclusive start line
      columnBegin - inclusive start column
  • Method Details

    • setEnd

      public void setEnd(int lineEnd, int columnEnd)
      Set the inclusive end line and exclusive end column of the represented range.
      Parameters:
      lineEnd - inclusive end line
      columnEnd - exclusive end column
    • getObject

      public Object getObject()
      Description copied from interface: IObjectLocation
      Get the represented object.
      Specified by:
      getObject in interface IObjectLocation
      Returns:
      the represented object
    • getDepth

      public int getDepth()
      Get the optional nesting depth associated with this location.
      Returns:
      the depth value
    • getLineBegin

      public int getLineBegin()
      Description copied from interface: IObjectLocation
      Get the first line of the object's textual range.
      Specified by:
      getLineBegin in interface IObjectLocation
      Returns:
      the inclusive start line index
    • getLineEnd

      public int getLineEnd()
      Description copied from interface: IObjectLocation
      Get the last line of the object's textual range.
      Specified by:
      getLineEnd in interface IObjectLocation
      Returns:
      the inclusive end line index
    • getColumnBegin

      public int getColumnBegin()
      Description copied from interface: IObjectLocation
      Get the first column of the object's textual range.
      Specified by:
      getColumnBegin in interface IObjectLocation
      Returns:
      the inclusive start column offset
    • getColumnEnd

      public int getColumnEnd()
      Description copied from interface: IObjectLocation
      Get the end column of the object's textual range.
      Specified by:
      getColumnEnd in interface IObjectLocation
      Returns:
      the exclusive end column offset