org.jboss.reflect.plugins
Class AnnotationHolder

java.lang.Object
  extended by org.jboss.util.JBossObject
      extended by org.jboss.reflect.plugins.AbstractAnnotatedInfo
          extended by org.jboss.reflect.plugins.AnnotationHolder
All Implemented Interfaces:
Serializable, Cloneable, AnnotatedInfo, org.jboss.util.JBossInterface
Direct Known Subclasses:
AbstractPropertyInfo, ConstructorInfoImpl, EnumConstantInfoImpl, FieldInfoImpl, MethodInfoImpl, PackageInfoImpl, ParameterInfoImpl

public class AnnotationHolder
extends AbstractAnnotatedInfo

An annotation holder

Author:
Bill Burke, Adrian Brock
See Also:
Serialized Form

Field Summary
protected  HashMap<String,AnnotationValue> annotationMap
          Annotations map Map
protected  AnnotationValue[] annotationsArray
          The annotations
 
Fields inherited from class org.jboss.util.JBossObject
hashCode, log, toString
 
Constructor Summary
AnnotationHolder()
          Create a new annotation holder
AnnotationHolder(AnnotationValue[] annotations)
          Create a new AnnotationHolder.
 
Method Summary
 AnnotationValue getAnnotation(String name)
          Get an annotation
 AnnotationValue[] getAnnotations()
          Get the annotations
 boolean isAnnotationPresent(String name)
          Test whether an annotation is present
protected  void setupAnnotations(AnnotationValue[] annotations)
          Set up the annotations
 
Methods inherited from class org.jboss.reflect.plugins.AbstractAnnotatedInfo
getUnderlyingAnnotation, getUnderlyingAnnotations, isAnnotationPresent
 
Methods inherited from class org.jboss.util.JBossObject
cacheGetHashCode, cacheToString, clone, equals, flushJBossObjectCache, getClassShortName, getHashCode, hashCode, list, notEqual, toShortString, toShortString, toString, toString, toStringImplementation
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.util.JBossInterface
clone, toShortString, toShortString
 

Field Detail

annotationsArray

protected AnnotationValue[] annotationsArray
The annotations


annotationMap

protected HashMap<String,AnnotationValue> annotationMap
Annotations map Map

Constructor Detail

AnnotationHolder

public AnnotationHolder()
Create a new annotation holder


AnnotationHolder

public AnnotationHolder(AnnotationValue[] annotations)
Create a new AnnotationHolder.

Parameters:
annotations - the annotations
Method Detail

getAnnotations

public AnnotationValue[] getAnnotations()
Description copied from interface: AnnotatedInfo
Get the annotations

Returns:
the annotations

getAnnotation

public AnnotationValue getAnnotation(String name)
Description copied from interface: AnnotatedInfo
Get an annotation

Parameters:
name - the name
Returns:
the annotation

isAnnotationPresent

public boolean isAnnotationPresent(String name)
Description copied from interface: AnnotatedInfo
Test whether an annotation is present

Parameters:
name - the name
Returns:
true when the annotation is present

setupAnnotations

protected void setupAnnotations(AnnotationValue[] annotations)
Set up the annotations

Parameters:
annotations - the annotations


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.