Class RelativeLocation
java.lang.Object
org.checkerframework.afu.scenelib.el.RelativeLocation
- All Implemented Interfaces:
Comparable<RelativeLocation>
A
RelativeLocation holds location information for a instanceof, cast, or new: either the
bytecode offset or the source code index. I call instanceof, cast, or new "the construct".-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intThe source code index of the construct.final intThe bytecode offset of the construct.final intThe type index used for intersection types in casts. -
Method Summary
Modifier and TypeMethodDescriptionintstatic RelativeLocationcreateIndex(int index, int type_index) static RelativeLocationcreateOffset(int offset, int type_index) booleanThisRelativeLocationequalsoif and only ifois another nonnullRelativeLocationandthisandohave equaloffsetandindex.booleanReturns true if thisRelativeLocationequalso; a slightly faster variant ofequals(Object)for when the argument is statically known to be another nonnullRelativeLocation.inthashCode()booleantoString()
-
Field Details
-
offset
public final int offsetThe bytecode offset of the construct. -
index
public final int indexThe source code index of the construct. -
type_index
public final int type_indexThe type index used for intersection types in casts.
-
-
Method Details
-
createOffset
-
createIndex
-
isBytecodeOffset
public boolean isBytecodeOffset() -
getLocationString
-
compareTo
- Specified by:
compareToin interfaceComparable<RelativeLocation>
-
equals
Returns true if thisRelativeLocationequalso; a slightly faster variant ofequals(Object)for when the argument is statically known to be another nonnullRelativeLocation. -
equals
ThisRelativeLocationequalsoif and only ifois another nonnullRelativeLocationandthisandohave equaloffsetandindex. -
hashCode
public int hashCode() -
toString
-