Class ComplexSymbolFactory.Location

java.lang.Object
java_cup.runtime.ComplexSymbolFactory.Location
Enclosing class:
ComplexSymbolFactory

public static class ComplexSymbolFactory.Location extends Object
  • Constructor Details

    • Location

      public Location(ComplexSymbolFactory.Location other)
      Copy Constructor for other ComplexSymbolFactory based Locations
      Parameters:
      other -
    • Location

      public Location(String unit, int line, int column, int offset)
      Location Object stores compilation unit, line, column and offset to the file start
      Parameters:
      unit - compilation unit, e.g. file name
      line - line number
      column - column number
      offset - offset from file start
    • Location

      public Location(String unit, int line, int column)
      Location Object stores compilation unit, line and column
      Parameters:
      unit - compilation unit, e.g. file name
      line - line number
      column - column number
    • Location

      public Location(int line, int column, int offset)
      Location Object stores line, column and offset to the file start
      Parameters:
      line - line number
      column - column number
      offset - offset from file start
    • Location

      public Location(int line, int column)
      Location Object stores line and column
      Parameters:
      line - line number
      column - column number
  • Method Details

    • getColumn

      public int getColumn()
      getColumn
    • getLine

      public int getLine()
      getLine
    • move

      public void move(int linediff, int coldiff, int offsetdiff)
      move moves this Location by the given differences.
      Parameters:
      linediff -
      coldiff -
      offsetdiff -
    • clone

      Cloning factory method
      Parameters:
      other -
      Returns:
      new cloned Location
    • getUnit

      public String getUnit()
      getUnit
    • toString

      public String toString()
      getLine
      Overrides:
      toString in class Object
    • toXML

      public void toXML(XMLStreamWriter writer, String orientation) throws XMLStreamException
      Writes the location information directly into an XML document
      Parameters:
      writer - the destination XML Document
      orientation - adds details about the orientation of this location as an attribute; often used with the strings "left" or "right"
      Throws:
      XMLStreamException
    • getOffset

      public int getOffset()
      getOffset