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 int
The source code index of the construct.final int
The bytecode offset of the construct.final int
The type index used for intersection types in casts. -
Method Summary
Modifier and TypeMethodDescriptionint
static RelativeLocation
createIndex
(int index, int type_index) static RelativeLocation
createOffset
(int offset, int type_index) boolean
ThisRelativeLocation
equalso
if and only ifo
is another nonnullRelativeLocation
andthis
ando
have equaloffset
andindex
.boolean
Returns true if thisRelativeLocation
equalso
; a slightly faster variant ofequals(Object)
for when the argument is statically known to be another nonnullRelativeLocation
.int
hashCode()
boolean
toString()
-
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:
compareTo
in interfaceComparable<RelativeLocation>
-
equals
Returns true if thisRelativeLocation
equalso
; a slightly faster variant ofequals(Object)
for when the argument is statically known to be another nonnullRelativeLocation
. -
equals
ThisRelativeLocation
equalso
if and only ifo
is another nonnullRelativeLocation
andthis
ando
have equaloffset
andindex
. -
hashCode
public int hashCode() -
toString
-