Package com.evolveum.axiom.lang.antlr
Record Class PositionContext
java.lang.Object
java.lang.Record
com.evolveum.axiom.lang.antlr.PositionContext
public record PositionContext(int cursorIndex, @NotNull org.antlr.v4.runtime.tree.ParseTree node)
extends Record
Node by locations position cursor in AST, cursorIndex points to branch in node where the terminal symbol is located
Created by Dominik.
-
Constructor Summary
ConstructorDescriptionPositionContext
(int cursorIndex, @NotNull org.antlr.v4.runtime.tree.ParseTree node) Creates an instance of aPositionContext
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value of thecursorIndex
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotNull org.antlr.v4.runtime.tree.ParseTree
node()
Returns the value of thenode
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
PositionContext
public PositionContext(int cursorIndex, @NotNull @NotNull org.antlr.v4.runtime.tree.ParseTree node) Creates an instance of aPositionContext
record class.- Parameters:
cursorIndex
- the value for thecursorIndex
record componentnode
- the value for thenode
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
cursorIndex
public int cursorIndex()Returns the value of thecursorIndex
record component.- Returns:
- the value of the
cursorIndex
record component
-
node
@NotNull public @NotNull org.antlr.v4.runtime.tree.ParseTree node()Returns the value of thenode
record component.- Returns:
- the value of the
node
record component
-