Interface IMemberValuePairBinding
- All Superinterfaces:
IBinding
Represents a resolved instance of an annotation's member value pair.
Resolved annotation are computed along with other bindings; these objects
correspond to
MemberValuePair 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
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
-
getName
-
getMethodBinding
IMethodBinding getMethodBinding()Returns the method binding corresponding to the named annotation type member.- Returns:
- the method binding for the annotation type member
-
getValue
Object getValue()Returns the resolved value. Resolved values are represented as follows:- Primitive type - the equivalent boxed object
- java.lang.Class - the
ITypeBindingfor the class object - java.lang.String - the string value itself
- enum type - the
IVariableBindingfor the enum constant - annotation type - an
IAnnotationBinding - array type - an
Object[]whose elements are as per above (the language only allows single dimensional arrays in annotations)
- Returns:
- the resolved value, or
nullif none exists
-
isDefault
boolean isDefault()- Returns:
trueiff this member value pair's value is the default value. Returnsfalseotherwise.
-