public class FieldInvariants
extends java.lang.Object
Constructor and Description |
---|
FieldInvariants(FieldInvariants other,
java.util.List<java.lang.String> fields,
java.util.List<javax.lang.model.element.AnnotationMirror> qualifiers)
Creates a new object with all the invariant in
other , plus those specified by fields and qualifiers . |
FieldInvariants(java.util.List<java.lang.String> fields,
java.util.List<javax.lang.model.element.AnnotationMirror> qualifiers) |
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
getFields() |
java.util.List<javax.lang.model.element.AnnotationMirror> |
getQualifiersFor(java.lang.CharSequence field)
Returns a list of qualifiers for
field . |
Result |
isSuperInvariant(FieldInvariants superInvar,
AnnotatedTypeFactory factory) |
boolean |
isWellFormed() |
public FieldInvariants(java.util.List<java.lang.String> fields, java.util.List<javax.lang.model.element.AnnotationMirror> qualifiers)
public FieldInvariants(FieldInvariants other, java.util.List<java.lang.String> fields, java.util.List<javax.lang.model.element.AnnotationMirror> qualifiers)
other
, plus those specified by fields
and qualifiers
.other
- other invariant object, may be nullfields
- list of fieldsqualifiers
- list of qualifierspublic java.util.List<java.lang.String> getFields()
public java.util.List<javax.lang.model.element.AnnotationMirror> getQualifiersFor(java.lang.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