Class AnnotationFieldType
java.lang.Object
org.checkerframework.afu.scenelib.util.EqualByStringRepresentation
org.checkerframework.afu.scenelib.field.AnnotationFieldType
An
AnnotationFieldType represents a type that can be the type of an annotation field.
Each subclass represents one kind of type allowed by the Java language.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract <R,T> R accept(AFTVisitor<R, T> v, T arg) final StringDeprecated.abstract voidformat(StringBuilder sb, Object o) Formats an annotation field value.static AnnotationFieldTypefromClass(Class<?> c, Map<String, AnnotationDef> adefs) abstract booleanReturns true if this value is valid for this AnnotationFieldType.abstract StringtoString()Returns the string representation of the type that would appear in an index file.static final AnnotationFieldTypeunify(AnnotationFieldType aft1, AnnotationFieldType aft2) Returns anAnnotationFieldTypecontaining all the information from both arguments, ornullif the two arguments contradict each other.Methods inherited from class org.checkerframework.afu.scenelib.util.EqualByStringRepresentation
equals, hashCode
-
Constructor Details
-
AnnotationFieldType
public AnnotationFieldType()
-
-
Method Details
-
toString
Returns the string representation of the type that would appear in an index file. Used byIndexFileWriter.- Specified by:
toStringin classEqualByStringRepresentation
-
format
Deprecated.Formats an annotation field value.- Parameters:
o- the value to format- Returns:
- the formatted annotation field value
-
format
Formats an annotation field value.- Parameters:
sb- where to format the value too- the value to format
-
isValidValue
Returns true if this value is valid for this AnnotationFieldType. -
fromClass
-
unify
Returns anAnnotationFieldTypecontaining all the information from both arguments, ornullif the two arguments contradict each other.Currently this just merges the
ArrayAFT.elementTypefield, so that if both arguments areArrayAFTs, one of known element type and the other of unknown element type, anArrayAFTof the known element type is returned. Furthermore, if both arguments areAnnotationAFTs, the sub-definitions might directly or indirectly containArrayAFTs, soAnnotationDef.unify(org.checkerframework.afu.scenelib.el.AnnotationDef, org.checkerframework.afu.scenelib.el.AnnotationDef)is called to unify the sub-definitions recursively. -
accept
-