public abstract class UBQualifier extends Object
UpperBoundUnknown
is modeled as UBQualifier.UpperBoundUnknownQualifier
and UpperBoundBottom
is modeled as UpperBoundBottomQualifier
.
LTLengthOf
is modeled by LessThanLengthOf
. LTEqLengthOf
is equivalent
to @LessThanLengthOf
with an offset of -1. LTOMLengthOf
is equivalent to @LessThanLengthOf
with an offset of 1.
Modifier and Type | Class and Description |
---|---|
static class |
UBQualifier.UpperBoundUnknownQualifier |
Constructor and Description |
---|
UBQualifier() |
Modifier and Type | Method and Description |
---|---|
static UBQualifier |
createUBQualifier(AnnotatedTypeMirror type,
AnnotationMirror top) |
static UBQualifier |
createUBQualifier(AnnotationMirror am) |
static UBQualifier |
createUBQualifier(List<String> arrays,
List<String> offsets)
Creates an
UBQualifier from the given arrays and offsets. |
static UBQualifier |
createUBQualifier(String array,
String offset) |
abstract UBQualifier |
glb(UBQualifier other) |
boolean |
hasArrayWithOffsetNeg1(String array)
Returns whether or not this qualifier has array with offset of -1.
|
boolean |
isBottom() |
boolean |
isLessThanLengthOf(String array)
Is the value with this qualifier less than the length of array?
|
boolean |
isLessThanLengthOfAny(List<String> arrays)
Is the value with this qualifier less than the length of any of the arrays?
|
boolean |
isLessThanLengthQualifier() |
boolean |
isLessThanOrEqualTo(String array)
Is the value with this qualifier less than or equal to the length of array?
|
boolean |
isPoly() |
abstract boolean |
isSubtype(UBQualifier superType) |
boolean |
isUnknown() |
abstract UBQualifier |
lub(UBQualifier other) |
UBQualifier |
minusOffset(int value) |
UBQualifier |
minusOffset(Node node,
UpperBoundAnnotatedTypeFactory factory) |
UBQualifier |
plusOffset(int value) |
UBQualifier |
plusOffset(Node node,
UpperBoundAnnotatedTypeFactory factory)
Add the node as an offset to a copy of this qualifier.
|
UBQualifier |
widenUpperBound(UBQualifier obj) |
public static UBQualifier createUBQualifier(AnnotationMirror am)
public static UBQualifier createUBQualifier(String array, String offset)
public static UBQualifier createUBQualifier(AnnotatedTypeMirror type, AnnotationMirror top)
public static UBQualifier createUBQualifier(List<String> arrays, List<String> offsets)
UBQualifier
from the given arrays and offsets. The list of arrays may not
be empty. If the offsets list is empty, then an offset of 0 is used for each array. If the
offsets list is not empty, then it must be the same size as array.arrays
- Non-empty list of arraysoffsets
- list of offset, if empty, an offset of 0 is usedUBQualifier
for the arrays with the given offsets.public UBQualifier plusOffset(Node node, UpperBoundAnnotatedTypeFactory factory)
LessThanLengthOf#plusOffset(int)
for
an explanation of how node is added as an offset.node
- Nodefactory
- AnnotatedTypeFactorypublic UBQualifier plusOffset(int value)
public UBQualifier minusOffset(Node node, UpperBoundAnnotatedTypeFactory factory)
public UBQualifier minusOffset(int value)
public boolean isLessThanLengthQualifier()
public boolean isUnknown()
public boolean isBottom()
public boolean isPoly()
public abstract boolean isSubtype(UBQualifier superType)
public abstract UBQualifier lub(UBQualifier other)
public UBQualifier widenUpperBound(UBQualifier obj)
public abstract UBQualifier glb(UBQualifier other)
public boolean isLessThanLengthOf(String array)
array
- String arraypublic boolean isLessThanLengthOfAny(List<String> arrays)
arrays
- list of arrayspublic boolean hasArrayWithOffsetNeg1(String array)
array
- array expressionpublic boolean isLessThanOrEqualTo(String array)
array
- String array