public static class ComplexSymbolFactory.Location
extends java.lang.Object
Constructor and Description |
---|
Location(ComplexSymbolFactory.Location other)
Copy Constructor for other ComplexSymbolFactory based Locations
|
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(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
|
Modifier and Type | Method and Description |
---|---|
static ComplexSymbolFactory.Location |
clone(ComplexSymbolFactory.Location other)
Cloning factory method
|
int |
getColumn()
getColumn
|
int |
getLine()
getLine
|
int |
getOffset()
getOffset
|
java.lang.String |
getUnit()
getUnit
|
void |
move(int linediff,
int coldiff,
int offsetdiff)
move moves this Location by the given differences.
|
java.lang.String |
toString()
getLine
|
void |
toXML(javax.xml.stream.XMLStreamWriter writer,
java.lang.String orientation)
Writes the location information directly into an XML document
|
public Location(ComplexSymbolFactory.Location other)
other
- public Location(java.lang.String unit, int line, int column, int offset)
unit
- compilation unit, e.g. file nameline
- line numbercolumn
- column numberoffset
- offset from file startpublic Location(java.lang.String unit, int line, int column)
unit
- compilation unit, e.g. file nameline
- line numbercolumn
- column numberpublic Location(int line, int column, int offset)
line
- line numbercolumn
- column numberoffset
- offset from file startpublic Location(int line, int column)
line
- line numbercolumn
- column numberpublic int getColumn()
public int getLine()
public void move(int linediff, int coldiff, int offsetdiff)
linediff
- coldiff
- offsetdiff
- public static ComplexSymbolFactory.Location clone(ComplexSymbolFactory.Location other)
other
- public java.lang.String getUnit()
public java.lang.String toString()
toString
in class java.lang.Object
public void toXML(javax.xml.stream.XMLStreamWriter writer, java.lang.String orientation) throws javax.xml.stream.XMLStreamException
writer
- the destination XML Documentorientation
- adds details about the orientation of this location as an attribute; often used with the strings "left" or "right"javax.xml.stream.XMLStreamException
public int getOffset()