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) |
abstract 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 |
isLessThanOrEqualTo(String array)
Is the value with this qualifier less than or equal to the length of array?
|
abstract boolean |
isSubtype(UBQualifier superType) |
abstract boolean |
isUnknown() |
boolean |
isUnknownOrBottom() |
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.
|
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 final boolean isUnknownOrBottom()
public abstract boolean isUnknown()
public abstract boolean isBottom()
public abstract boolean isSubtype(UBQualifier superType)
public abstract UBQualifier lub(UBQualifier other)
public abstract UBQualifier glb(UBQualifier other)
public boolean isLessThanLengthOf(String array)
array
- String arraypublic boolean isLessThanLengthOfAny(List<String> arrays)
arrays
- list of arrayspublic boolean isLessThanOrEqualTo(String array)
array
- String array