polyglot.util
Class Position
java.lang.Object
polyglot.util.Position
- All Implemented Interfaces:
- java.io.Serializable
public class Position
- extends java.lang.Object
- implements java.io.Serializable
This class represents a posiiton within a file.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
UNKNOWN
public static final int UNKNOWN
- See Also:
- Constant Field Values
END_UNUSED
public static final int END_UNUSED
- See Also:
- Constant Field Values
COMPILER_GENERATED
public static final Position COMPILER_GENERATED
Position
protected Position()
- For deserialization.
Position
public Position(java.lang.String file)
Position
public Position(java.lang.String file,
int line)
Position
public Position(java.lang.String file,
int line,
int column)
Position
public Position(java.lang.String file,
int line,
int column,
int endLine,
int endColumn)
Position
public Position(Position start,
Position end)
compilerGenerated
public static Position compilerGenerated(int depth)
- Get a compiler generated position using the caller at the given stack
depth. Depth 1 is the caller. Depth 2 is the caller's caller, etc.
compilerGenerated
public static Position compilerGenerated()
- Get a compiler generated position.
line
public int line()
column
public int column()
endLine
public int endLine()
endColumn
public int endColumn()
file
public java.lang.String file()
nameAndLineString
public java.lang.String nameAndLineString()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object