Record Class TreeFinder.PositionAndASTPath
java.lang.Object
java.lang.Record
org.checkerframework.afu.annotator.find.TreeFinder.PositionAndASTPath
- Record Components:
pos- a source positionastPath- the AST path to the tree atpos, or null if there is none
- Enclosing class:
TreeFinder
public static record TreeFinder.PositionAndASTPath(int pos, @Nullable ASTPath astPath)
extends Record
A source position at which to insert text, and the AST path to the tree at that position.
-
Constructor Summary
ConstructorsConstructorDescriptionPositionAndASTPath(int pos, @Nullable ASTPath astPath) Creates an instance of aPositionAndASTPathrecord class. -
Method Summary
Modifier and TypeMethodDescriptionastPath()Returns the value of theastPathrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intpos()Returns the value of theposrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
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 '=='. -
pos
public int pos()Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-
astPath
Returns the value of theastPathrecord component.- Returns:
- the value of the
astPathrecord component
-