JBoss Reflection 2.2.1.SP1

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, Ales Justin
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
protected  AnnotationValue getDeclaredAnnotation(String name)
          Get the declared annotations
protected  AnnotationValue[] getDeclaredAnnotations()
          Get the declared annotations
protected abstract  ClassInfo getSuperHolder()
          Get the super holder of annoations
 boolean isAnnotationPresent(String name)
          Test whether an annotation is present
protected  boolean isDeclaredAnnotationPresent(String name)
          Is declared annotation 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

protected AnnotationValue[] getDeclaredAnnotations()
Get the declared annotations

Returns:
the declared annotations

getDeclaredAnnotation

protected AnnotationValue getDeclaredAnnotation(String name)
Get the declared annotations

Parameters:
name - the annotation name
Returns:
the declared annotations

isDeclaredAnnotationPresent

protected boolean isDeclaredAnnotationPresent(String name)
Is declared annotation present.

Parameters:
name - the annotation name
Returns:
true if the annotation is present, false otherwise

getAllAnnotations

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

Returns:
the map

getAnnotations

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

Returns:
the annotations. If there are no annotations a zero length array is returned

getAnnotation

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

Parameters:
name - the name
Returns:
the annotation or null if it is not there

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

getSuperHolder

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

Returns:
the super holder

JBoss Reflection 2.2.1.SP1

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