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
ConstructorsConstructorDescriptionPositionContext(int cursorIndex, @NotNull org.antlr.v4.runtime.tree.ParseTree node) Creates an instance of aPositionContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecursorIndexrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull org.antlr.v4.runtime.tree.ParseTreenode()Returns the value of thenoderecord component.final StringtoString()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 aPositionContextrecord class.- Parameters:
cursorIndex- the value for thecursorIndexrecord componentnode- the value for thenoderecord 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 thecursorIndexrecord component.- Returns:
- the value of the
cursorIndexrecord component
-
node
@NotNull public @NotNull org.antlr.v4.runtime.tree.ParseTree node()Returns the value of thenoderecord component.- Returns:
- the value of the
noderecord component
-