org.jboss.reflect.plugins
Class InheritableAnnotationHolder

java.lang.Object
  extended by org.jboss.util.JBossObject
      extended by org.jboss.reflect.plugins.AbstractAnnotatedInfo
          extended by org.jboss.reflect.plugins.InheritableAnnotationHolder
All Implemented Interfaces:
Serializable, Cloneable, AnnotatedInfo, org.jboss.util.JBossInterface
Direct Known Subclasses:
ClassInfoImpl

public abstract class InheritableAnnotationHolder
extends AbstractAnnotatedInfo

An annotation holder

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

Field Summary
protected  Map<String,AnnotationValue> allAnnotations
          All annotations Map
protected  AnnotationValue[] allAnnotationsArray
          All annotations
protected  Object annotatedElement
          The annotated element
protected  AnnotationHelper annotationHelper
          The annotation helper
protected  Map<String,AnnotationValue> declaredAnnotations
          Declared annotations Map
protected  AnnotationValue[] declaredAnnotationsArray
          Declared annotations
 
Fields inherited from class org.jboss.util.JBossObject
hashCode, log, toString
 
Constructor Summary
InheritableAnnotationHolder()
          Create a new InheritableAnnotationHolder.
 
Method Summary
protected  Map<String,AnnotationValue> getAllAnnotations()
          Get all the annotations as a map
 AnnotationValue getAnnotation(String name)
          Get an annotation
 AnnotationValue[] getAnnotations()
          Get the annotations
 AnnotationValue[] getDeclaredAnnotations()
          Get the declared annotations
protected abstract  InheritableAnnotationHolder getSuperHolder()
          Get the super holder of annoations
 boolean isAnnotationPresent(String name)
          Test whether an annotation is present
 void setAnnotatedElement(Object annotatedElement)
           
 void setAnnotationHelper(AnnotationHelper annotationHelper)
           
 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

declaredAnnotations

protected Map<String,AnnotationValue> declaredAnnotations
Declared annotations Map


allAnnotations

protected Map<String,AnnotationValue> allAnnotations
All annotations Map


allAnnotationsArray

protected AnnotationValue[] allAnnotationsArray
All annotations


declaredAnnotationsArray

protected AnnotationValue[] declaredAnnotationsArray
Declared annotations


annotatedElement

protected Object annotatedElement
The annotated element


annotationHelper

protected transient AnnotationHelper annotationHelper
The annotation helper

Constructor Detail

InheritableAnnotationHolder

public InheritableAnnotationHolder()
Create a new InheritableAnnotationHolder.

Method Detail

setAnnotatedElement

public void setAnnotatedElement(Object annotatedElement)

setAnnotationHelper

public void setAnnotationHelper(AnnotationHelper annotationHelper)

getDeclaredAnnotations

public AnnotationValue[] getDeclaredAnnotations()
Get the declared annotations

Returns:
the declared annotations

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

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

Parameters:
annotations - the annotations

getAllAnnotations

protected Map<String,AnnotationValue> getAllAnnotations()
Get all the annotations as a map

Returns:
the map

getSuperHolder

protected abstract InheritableAnnotationHolder getSuperHolder()
Get the super holder of annoations

Returns:
the super holder


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