public class FieldInvariants extends Object
Constructor and Description |
---|
FieldInvariants(FieldInvariants other,
List<String> fields,
List<AnnotationMirror> qualifiers)
Creates a new object with all the invariant in
other , plus those specified by fields and qualifiers . |
FieldInvariants(List<String> fields,
List<AnnotationMirror> qualifiers) |
Modifier and Type | Method and Description |
---|---|
List<String> |
getFields() |
List<AnnotationMirror> |
getQualifiersFor(CharSequence field)
Returns a list of qualifiers for
field . |
Result |
isSuperInvariant(FieldInvariants superInvar,
AnnotatedTypeFactory factory) |
boolean |
isWellFormed() |
public FieldInvariants(List<String> fields, List<AnnotationMirror> qualifiers)
public FieldInvariants(FieldInvariants other, List<String> fields, List<AnnotationMirror> qualifiers)
other
, plus those specified by fields
and qualifiers
.other
- other invariant object, may be nullfields
- list of fieldsqualifiers
- list of qualifierspublic List<AnnotationMirror> getQualifiersFor(CharSequence field)
field
. If field has no qualifiers, then the empty
list is returned.field
- Simple field namefield
public boolean isWellFormed()
public Result isSuperInvariant(FieldInvariants superInvar, AnnotatedTypeFactory factory)
superInvar
is a super invariant, otherwise returns a Result with the
error message