public abstract class UBQualifier
extends java.lang.Object
UpperBoundUnknown
is modeled as UBQualifier.UpperBoundUnknownQualifier
and UpperBoundBottom
is modeled as UpperBoundBottomQualifier
.
LTLengthOf
is modeled by UBQualifier.LessThanLengthOf
. LTEqLengthOf
is equivalent
to @UBQualifier.LessThanLengthOf
with an offset of -1. LTOMLengthOf
is equivalent to @UBQualifier.LessThanLengthOf
with an offset of 1.
Modifier and Type | Class and Description |
---|---|
static class |
UBQualifier.LessThanLengthOf |
static class |
UBQualifier.UpperBoundUnknownQualifier |
Constructor and Description |
---|
UBQualifier() |
Modifier and Type | Method and Description |
---|---|
static UBQualifier |
createUBQualifier(AnnotatedTypeMirror type,
javax.lang.model.element.AnnotationMirror top) |
static UBQualifier |
createUBQualifier(javax.lang.model.element.AnnotationMirror am) |
static UBQualifier |
createUBQualifier(java.util.List<java.lang.String> sequences,
java.util.List<java.lang.String> offsets)
Creates an
UBQualifier from the given sequences and offsets. |
static UBQualifier |
createUBQualifier(java.lang.String sequence,
java.lang.String offset) |
abstract UBQualifier |
glb(UBQualifier other) |
boolean |
hasSequenceWithOffset(java.lang.String sequence,
int offset)
Returns whether or not this qualifier has sequence with the specified offset.
|
boolean |
isBottom() |
boolean |
isLessThanLengthOf(java.lang.String sequence)
Is the value with this qualifier less than the length of sequence?
|
boolean |
isLessThanLengthOfAny(java.util.List<java.lang.String> sequences)
Is the value with this qualifier less than the length of any of the sequences?
|
boolean |
isLessThanLengthQualifier() |
boolean |
isLessThanOrEqualTo(java.lang.String sequence)
Is the value with this qualifier less than or equal to the length of sequence?
|
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(javax.lang.model.element.AnnotationMirror am)
public static UBQualifier createUBQualifier(java.lang.String sequence, java.lang.String offset)
public static UBQualifier createUBQualifier(AnnotatedTypeMirror type, javax.lang.model.element.AnnotationMirror top)
public static UBQualifier createUBQualifier(java.util.List<java.lang.String> sequences, java.util.List<java.lang.String> offsets)
UBQualifier
from the given sequences and offsets. The list of sequences
may not be empty. If the offsets list is empty, then an offset of 0 is used for each
sequence. If the offsets list is not empty, then it must be the same size as sequence.sequences
- non-empty list of sequencesoffsets
- list of offset, if empty, an offset of 0 is usedUBQualifier
for the sequences with the given offsetspublic UBQualifier plusOffset(Node node, UpperBoundAnnotatedTypeFactory factory)
UBQualifier.LessThanLengthOf.plusOffset(int)
for
an explanation of how node is added as an offset.node
- a 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(java.lang.String sequence)
sequence
- a String sequencepublic boolean isLessThanLengthOfAny(java.util.List<java.lang.String> sequences)
sequences
- list of sequencespublic boolean hasSequenceWithOffset(java.lang.String sequence, int offset)
sequence
- sequence expressionoffset
- the offset being looked forpublic boolean isLessThanOrEqualTo(java.lang.String sequence)
sequence
- a String sequence