Class ComplexSymbolFactory.Location

  • Enclosing class:
    ComplexSymbolFactory

    public static class ComplexSymbolFactory.Location
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Location​(int line, int column)
      Location Object stores line and column
      Location​(int line, int column, int offset)
      Location Object stores line, column and offset to the file start
      Location​(ComplexSymbolFactory.Location other)
      Copy Constructor for other ComplexSymbolFactory based Locations
      Location​(java.lang.String unit, int line, int column)
      Location Object stores compilation unit, line and column
      Location​(java.lang.String unit, int line, int column, int offset)
      Location Object stores compilation unit, line, column and offset to the file start
    • Constructor Detail

      • Location

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

        public Location​(java.lang.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​(java.lang.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 Detail

      • 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 -
      • getUnit

        public java.lang.String getUnit()
        getUnit
      • toString

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

        public void toXML​(javax.xml.stream.XMLStreamWriter writer,
                          java.lang.String orientation)
                   throws javax.xml.stream.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:
        javax.xml.stream.XMLStreamException
      • getOffset

        public int getOffset()
        getOffset