org.jboss.reflect.plugins
Class InheritableAnnotationHolder

java.lang.Object
  extended by org.jboss.util.JBossObject
      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 org.jboss.util.JBossObject
implements AnnotatedInfo, Serializable

An annotation holder

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

Field Summary
protected  Map allAnnotations
          All annotations Map
protected  AnnotationValue[] allAnnotationsArray
          All annotations
protected  Object annotatedElement
          The annotated element
protected  Map declaredAnnotations
          Declared annotations Map
protected  AnnotationValue[] declaredAnnotationsArray
          Declared annotations
protected  IntrospectionTypeInfoFactoryImpl typeInfoFactory
          The typeinfo factory
 
Fields inherited from class org.jboss.util.JBossObject
hashCode, log, toString
 
Constructor Summary
InheritableAnnotationHolder()
          Create a new InheritableAnnotationHolder.
 
Method Summary
protected  Map 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 setTypeInfoFactory(IntrospectionTypeInfoFactoryImpl typeInfoFactory)
          Set the typeinfo factory
 void setupAnnotations(AnnotationValue[] annotations)
          Set up the annotations
 
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 declaredAnnotations
Declared annotations Map


allAnnotations

protected Map allAnnotations
All annotations Map


allAnnotationsArray

protected AnnotationValue[] allAnnotationsArray
All annotations


declaredAnnotationsArray

protected AnnotationValue[] declaredAnnotationsArray
Declared annotations


annotatedElement

protected Object annotatedElement
The annotated element


typeInfoFactory

protected IntrospectionTypeInfoFactoryImpl typeInfoFactory
The typeinfo factory

Constructor Detail

InheritableAnnotationHolder

public InheritableAnnotationHolder()
Create a new InheritableAnnotationHolder.

Method Detail

setTypeInfoFactory

public void setTypeInfoFactory(IntrospectionTypeInfoFactoryImpl typeInfoFactory)
Set the typeinfo factory

Parameters:
typeInfoFactory - the typeinfo factory

setAnnotatedElement

public void setAnnotatedElement(Object annotatedElement)

getDeclaredAnnotations

public AnnotationValue[] getDeclaredAnnotations()
Get the declared annotations

Returns:
the declared annotations

getAnnotations

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

Specified by:
getAnnotations in interface AnnotatedInfo
Returns:
the annotations

getAnnotation

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

Specified by:
getAnnotation in interface AnnotatedInfo
Parameters:
name - the name
Returns:
the annotation

isAnnotationPresent

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

Specified by:
isAnnotationPresent in interface AnnotatedInfo
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 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 © 2002 JBoss Group, LLC. All Rights Reserved.