Interface IAnnotationBinding
- All Superinterfaces:
IBinding
Represents a resolved annotation. Resolved annotations are computed along with other
bindings; they correspond to
Annotation nodes.- Since:
- 3.2
-
Field Summary
Fields inherited from interface IBinding
ANNOTATION, MEMBER_VALUE_PAIR, METHOD, MODULE, PACKAGE, TYPE, VARIABLEModifier and TypeFieldDescriptionstatic final intKind constant (value 5) indicating an annotation binding.static final intKind constant (value 6) indicating a member value pair binding.static final intKind constant (value 4) indicating a method or constructor binding.static final intKind constant (value 7) indicating a module binding (added in JLS9 API).static final intKind constant (value 1) indicating a package binding.static final intKind constant (value 2) indicating a type binding.static final intKind constant (value 3) indicating a field or local variable binding. -
Method Summary
Modifier and TypeMethodDescriptionReturns the complete list of member value pairs for this annotation, including ones explicitly listed in the annotation as well as entries for annotation type members with default values that are implied.Returns the type of the annotation.Returns the list of declared member value pairs for this annotation.getName()Returns the name of the annotation type.Methods inherited from interface IBinding
equals, getAnnotations, getJavaElement, getKey, getKind, getModifiers, isDeprecated, isEqualTo, isRecovered, isSynthetic, toStringModifier and TypeMethodDescriptionbooleanThere is no special definition of equality for bindings; equality is simply object identity.Returns the resolved declaration annotations associated with this binding.Returns the Java element that corresponds to this binding.getKey()Returns the key for this binding.intgetKind()Returns the kind of bindings this is.intReturns the modifiers for this binding.booleanReturn whether this binding is for something that is deprecated.booleanReturns whether this binding has the same key as that of the given binding.booleanReturn whether this binding is created because the bindings recovery is enabled.booleanReturns whether this binding is synthetic.toString()Returns a string representation of this binding suitable for debugging purposes only.
-
Method Details
-
getAllMemberValuePairs
IMemberValuePairBinding[] getAllMemberValuePairs()Returns the complete list of member value pairs for this annotation, including ones explicitly listed in the annotation as well as entries for annotation type members with default values that are implied.- Returns:
- a possibly empty list of resolved member value pairs
-
getAnnotationType
ITypeBinding getAnnotationType()Returns the type of the annotation. The resulting type binding will always returntruetoITypeBinding.isAnnotation().- Returns:
- the type of the annotation
-
getDeclaredMemberValuePairs
IMemberValuePairBinding[] getDeclaredMemberValuePairs()Returns the list of declared member value pairs for this annotation. Returns an empty list for aMarkerAnnotation, a one element list for aSingleMemberAnnotation, and one entry for each of the explicitly listed values in aNormalAnnotation.Note that the list only includes entries for annotation type members that are explicitly mentioned in the annotation. The list does not include any annotation type members with default values that are merely implied. Use
getAllMemberValuePairs()to get those as well.- Returns:
- a possibly empty list of resolved member value pairs
-
getName
-