Class Annotations
java.lang.Object
org.checkerframework.afu.scenelib.Annotations
This noninstantiable class provides useful static methods related to annotations, following the
convention of
Collections.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic AnnotationDefstatic AnnotationDefstatic Annotationstatic AnnotationDefstatic AnnotationDefstatic EnumAFTstatic Annotationstatic Annotationstatic Annotationstatic Annotationstatic Set<Annotation> static Set<Annotation> static Set<Annotation> static Annotationstatic Set<Annotation> static Map<String, ? extends AnnotationFieldType> static List<Annotation> static Set<AnnotationDef> Annotations that are meta-annotated with themselves.static Set<Annotation> -
Method Summary
Modifier and TypeMethodDescriptionstatic AnnotationcreateValueAnnotation(AnnotationDef ad, Object value) static AnnotationDefcreateValueAnnotationDef(@BinaryName String name, Set<Annotation> metaAnnotations, AnnotationFieldType aft, String source) Create an annotation definition with only avaluefield.static Annotationstatic Set<Annotation> static final AnnotationClones the annotationausing the factoryafby iterating through its fields according to its definition and getting the values withAnnotation.getFieldValue(java.lang.String).valueFieldOnly(Object valueValue)
-
Field Details
-
noAnnotations
-
noFieldTypes
-
noFieldValues
-
typeQualifierMetaAnnotations
-
aftRetentionPolicy
-
adRetention
-
aRetentionClass
-
aRetentionRuntime
-
aRetentionSource
-
asRetentionClass
-
asRetentionRuntime
-
asRetentionSource
-
adTarget
-
aTargetTypeUse
-
onlyTypeAnnotationTargets
-
adDocumented
-
aDocumented
-
adNonNull
-
aNonNull
-
standardDefs
Annotations that are meta-annotated with themselves. Due to a flaw in the Scene Library, it is unable to read them from classfiles. An expedient workaround is to pre-define them, so they never need be read from a classfile.
-
-
Method Details
-
valueFieldOnly
-
createValueAnnotationDef
public static AnnotationDef createValueAnnotationDef(@BinaryName String name, Set<Annotation> metaAnnotations, AnnotationFieldType aft, String source) Create an annotation definition with only avaluefield.- Parameters:
name- the name of the annotation being builtmetaAnnotations- the meta-annotations that appear on the annotation definiitionaft- the value of thevaluefieldsource- where the annotation came from, such as a filename- Returns:
- a new AnnotationDef
-
createValueAnnotation
-
getRetentionPolicyMetaAnnotation
-
getRetentionPolicyMetaAnnotationSet
-
rebuild
Clones the annotationausing the factoryafby iterating through its fields according to its definition and getting the values withAnnotation.getFieldValue(java.lang.String). Returns null if the factory is not interested ina.- Parameters:
a- the annotation to clone- Returns:
- a clone of the given annotation
-