public class AnnotationValueImpl extends AbstractValue implements AnnotationValue
Modifier and Type | Field and Description |
---|---|
protected AnnotationInfo |
annotationType
The annotation type
|
protected HashMap<String,Value> |
attributeValues
The attribute values
|
protected int |
hash
The hash code
|
protected Annotation |
underlying
The underlying annotation
|
Constructor and Description |
---|
AnnotationValueImpl()
Create a new Annotation value
|
AnnotationValueImpl(AnnotationInfo annotationType,
HashMap<String,Value> attributeValues)
Deprecated.
|
AnnotationValueImpl(AnnotationInfo annotationType,
HashMap<String,Value> attributeValues,
Annotation underlying)
Create a new Annotation value
|
Modifier and Type | Method and Description |
---|---|
protected void |
calculateHash()
Calculate the hashcode
|
boolean |
equals(Object o) |
AnnotationInfo |
getAnnotationType()
Get the annotation type
|
TypeInfo |
getType()
Get the type of the value
|
Annotation |
getUnderlyingAnnotation()
Get the underlying annotation
|
<T extends Annotation> |
getUnderlyingAnnotation(Class<T> annotationType)
Get the underlying annotation
|
Value |
getValue(String attributeName)
Get an attribute value
|
Map<String,Value> |
getValues()
Get the values
|
int |
hashCode() |
boolean |
isAnnotation()
Is this value an annotation
|
void |
toShortString(org.jboss.util.JBossStringBuilder buffer) |
protected void |
toString(org.jboss.util.JBossStringBuilder buffer) |
asAnnotation, asArray, asClass, asEnum, asPrimitive, asString, isArray, isClass, isEnum, isPrimitive, isString
cacheGetHashCode, cacheToString, clone, equals, flushJBossObjectCache, getClassShortName, getHashCode, list, notEqual, toShortString, toString, toStringImplementation
finalize, getClass, notify, notifyAll, wait, wait, wait
asAnnotation, asArray, asClass, asEnum, asPrimitive, asString, isArray, isClass, isEnum, isPrimitive, isString
protected AnnotationInfo annotationType
protected Annotation underlying
protected int hash
public AnnotationValueImpl()
@Deprecated public AnnotationValueImpl(AnnotationInfo annotationType, HashMap<String,Value> attributeValues)
annotationType
- the annotation infoattributeValues
- the attribute valuespublic AnnotationValueImpl(AnnotationInfo annotationType, HashMap<String,Value> attributeValues, Annotation underlying)
annotationType
- the annotation infoattributeValues
- the attribute valuesunderlying
- the underlying annotationpublic boolean isAnnotation()
Value
isAnnotation
in interface Value
isAnnotation
in class AbstractValue
public AnnotationInfo getAnnotationType()
AnnotationValue
getAnnotationType
in interface AnnotationValue
public Value getValue(String attributeName)
AnnotationValue
getValue
in interface AnnotationValue
attributeName
- the attribute namepublic Map<String,Value> getValues()
AnnotationValue
getValues
in interface AnnotationValue
public TypeInfo getType()
Value
public Annotation getUnderlyingAnnotation()
AnnotationValue
getUnderlyingAnnotation
in interface AnnotationValue
public <T extends Annotation> T getUnderlyingAnnotation(Class<T> annotationType)
AnnotationValue
getUnderlyingAnnotation
in interface AnnotationValue
T
- the annotation typeannotationType
- the annotationTypepublic int hashCode()
hashCode
in class org.jboss.util.JBossObject
protected void calculateHash()
public void toShortString(org.jboss.util.JBossStringBuilder buffer)
toShortString
in interface org.jboss.util.JBossInterface
toShortString
in class org.jboss.util.JBossObject
protected void toString(org.jboss.util.JBossStringBuilder buffer)
toString
in class org.jboss.util.JBossObject
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All rights reserved.