org.aspectj.org.eclipse.jdt.internal.compiler.apt.model
Class AnnotationValueImpl

java.lang.Object
  extended by org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.AnnotationValueImpl
All Implemented Interfaces:
javax.lang.model.element.AnnotationValue, TypeIds
Direct Known Subclasses:
AnnotationMemberValue

public class AnnotationValueImpl
extends java.lang.Object
implements javax.lang.model.element.AnnotationValue, TypeIds


Field Summary
 
Fields inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeIds
BitAutoCloseable, BitCloseable, BitResourceFreeCloseable, BitUninitialized, BitUninternedType, BitWrapperCloseable, Boolean2Boolean, Boolean2Int, Boolean2String, BOXING, Byte2Byte, Byte2Char, Byte2Double, Byte2Float, Byte2Int, Byte2Long, Byte2Short, Byte2String, Char2Byte, Char2Char, Char2Double, Char2Float, Char2Int, Char2Long, Char2Short, Char2String, COMPILE_TYPE_MASK, Double2Byte, Double2Char, Double2Double, Double2Float, Double2Int, Double2Long, Double2Short, Double2String, Float2Byte, Float2Char, Float2Double, Float2Float, Float2Int, Float2Long, Float2Short, Float2String, IMPLICIT_CONVERSION_MASK, InheritableBits, Int2Byte, Int2Char, Int2Double, Int2Float, Int2Int, Int2Long, Int2Short, Int2String, Long2Byte, Long2Char, Long2Double, Long2Float, Long2Int, Long2Long, Long2Short, Long2String, NoId, Null2Null, Null2String, Object2boolean, Object2byte, Object2char, Object2double, Object2float, Object2int, Object2long, Object2Object, Object2short, Object2String, Short2Byte, Short2Char, Short2Double, Short2Float, Short2Int, Short2Long, Short2Short, Short2String, String2String, T_boolean, T_byte, T_char, T_ComGoogleCommonBasePreconditions, T_ComGoogleInjectInject, T_ConfiguredAnnotationNonNull, T_ConfiguredAnnotationNonNullByDefault, T_ConfiguredAnnotationNullable, T_double, T_float, T_int, T_JavaIoException, T_JavaIoExternalizable, T_JavaIoObjectStreamException, T_JavaIoPrintStream, T_JavaIoSerializable, T_JavaLangAnnotationAnnotation, T_JavaLangAnnotationDocumented, T_JavaLangAnnotationElementType, T_JavaLangAnnotationInherited, T_JavaLangAnnotationRepeatable, T_JavaLangAnnotationRetention, T_JavaLangAnnotationRetentionPolicy, T_JavaLangAnnotationTarget, T_JavaLangAssertionError, T_JavaLangAutoCloseable, T_JavaLangBoolean, T_JavaLangByte, T_JavaLangCharacter, T_JavaLangClass, T_JavaLangClassNotFoundException, T_JavaLangCloneable, T_JavaLangDeprecated, T_JavaLangDouble, T_JavaLangEnum, T_JavaLangError, T_JavaLangException, T_JavaLangFloat, T_JavaLangFunctionalInterface, T_JavaLangIllegalArgumentException, T_JavaLangInteger, T_JavaLangInvokeMethodHandlePolymorphicSignature, T_JavaLangIterable, T_JavaLangLong, T_JavaLangNoClassDefError, T_JavaLangObject, T_JavaLangOverride, T_JavaLangReflectConstructor, T_JavaLangReflectField, T_JavaLangReflectMethod, T_JavaLangRuntimeException, T_JavaLangSafeVarargs, T_JavaLangShort, T_JavaLangString, T_JavaLangStringBuffer, T_JavaLangStringBuilder, T_JavaLangSuppressWarnings, T_JavaLangSystem, T_JavaLangThrowable, T_JavaLangVoid, T_JavaUtilCollection, T_JavaUtilIterator, T_JavaUtilObjects, T_JavaxInjectInject, T_JunitFrameworkAssert, T_LastWellKnownTypeId, T_long, T_null, T_OrgApacheCommonsLang3Validate, T_OrgApacheCommonsLangValidate, T_OrgEclipseCoreRuntimeAssert, T_OrgJunitAssert, T_short, T_undefined, T_void, UNBOXING
 
Constructor Summary
AnnotationValueImpl(BaseProcessingEnvImpl env, java.lang.Object value, TypeBinding type)
           
 
Method Summary
<R,P> R
accept(javax.lang.model.element.AnnotationValueVisitor<R,P> v, P p)
           
 boolean equals(java.lang.Object obj)
           
 java.lang.Object getValue()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AnnotationValueImpl

public AnnotationValueImpl(BaseProcessingEnvImpl env,
                           java.lang.Object value,
                           TypeBinding type)
Parameters:
value - The JDT representation of a compile-time constant. See ElementValuePair.getValue() for possible object types:
  • Constant for member of primitive type or String
  • TypeBinding for a member value of type Class
  • FieldBinding for an enum constant
  • AnnotationBinding for an annotation instance
  • Object[] for a member value of array type, where the array entries are one of the above
type - The JDT representation of the type of the constant, as determined by the return type of the element. This is needed because the type of the value may have been widened (e.g., byte to int) by the compiler and we need to call the proper visitor. This is used only for base types. If it is null or not a BaseTypeBinding, it is ignored and the type is determined from the type of the value.
Method Detail

accept

public <R,P> R accept(javax.lang.model.element.AnnotationValueVisitor<R,P> v,
                      P p)
Specified by:
accept in interface javax.lang.model.element.AnnotationValue

getValue

public java.lang.Object getValue()
Specified by:
getValue in interface javax.lang.model.element.AnnotationValue

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Specified by:
toString in interface javax.lang.model.element.AnnotationValue
Overrides:
toString in class java.lang.Object