Class Position
java.lang.Object
com.aquima.interactions.expressions.Position
- All Implemented Interfaces:
Serializable
This class contains the position information of a parsed node.
- Since:
- 6.0
- Author:
- F. van der Meer, O. Kerpershoek
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
This method returns the column in the line of the parsed unit.int
This method returns the line number of the parsed unit.int
This method returns the global offset.This method returns a string containing all the position information.This method returns the name of the parsed unit.toString()
-
Constructor Details
-
Position
Constructs the position information with the required arguments.- Parameters:
offset
- The global offset of the parsed unit.lineNumber
- The line number of the parsed unit.column
- The column number in the line of the parsed unit.unitName
- The name of the parsed unit.
-
-
Method Details
-
getOffset
public int getOffset()This method returns the global offset. The global offset is the position from the start of the parsed unit.- Returns:
- The global offset of the parsed unit.
-
getLineNumber
public int getLineNumber()This method returns the line number of the parsed unit.- Returns:
- the line number of the parsed unit.
-
getColumn
public int getColumn()This method returns the column in the line of the parsed unit.- Returns:
- the column in the line of the parsed unit.
-
getUnitName
This method returns the name of the parsed unit. The unit name is usually the name of the parsed file or expression.- Returns:
- the name of the parsed unit.
-
getString
This method returns a string containing all the position information.- Returns:
- a string containing all the position information.
-
toString
-