Class Where
- java.lang.Object
-
- ru.ispras.microtesk.translator.antlrex.symbols.Where
-
public final class Where extends java.lang.Object
TheWhere
class describes a location in a source file.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Where
commonTree(org.antlr.runtime.tree.CommonTree tree)
boolean
equals(java.lang.Object obj)
int
getLine()
Returns the line number.int
getPosition()
Returns the position in the line.java.lang.String
getUnit()
Returns the name of the source file (unit).int
hashCode()
static Where
nowhere()
static Where
token(org.antlr.runtime.Token token)
java.lang.String
toString()
-
-
-
Method Detail
-
nowhere
public static Where nowhere()
-
token
public static Where token(org.antlr.runtime.Token token)
-
commonTree
public static final Where commonTree(org.antlr.runtime.tree.CommonTree tree)
-
getUnit
public java.lang.String getUnit()
Returns the name of the source file (unit).- Returns:
- Source file (unit) name.
-
getLine
public int getLine()
Returns the line number.- Returns:
- Line number.
-
getPosition
public int getPosition()
Returns the position in the line.- Returns:
- Position in the line.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-