org.jboss.beans.metadata.plugins
Class AbstractAnnotationMetaData

java.lang.Object
  extended by org.jboss.util.JBossObject
      extended by org.jboss.beans.metadata.plugins.AbstractAnnotationMetaData
All Implemented Interfaces:
Serializable, Cloneable, AnnotationMetaData, CachingAnnotationMetaData, MetaDataVisitorNode, org.jboss.util.JBossInterface

public class AbstractAnnotationMetaData
extends org.jboss.util.JBossObject
implements CachingAnnotationMetaData, Serializable

Metadata for an annotation.

Version:
$Revision: 77476 $
Author:
Adrian Brock, Ales Justin
See Also:
Serialized Form

Field Summary
 String annotation
           
 
Fields inherited from class org.jboss.util.JBossObject
hashCode, log, toString
 
Constructor Summary
AbstractAnnotationMetaData()
          Create a new annotation meta data
AbstractAnnotationMetaData(String annotation)
           
 
Method Summary
 AbstractAnnotationMetaData clone()
          Clone the object
 void describeVisit(MetaDataVisitor vistor)
          Revisit the node
 boolean equals(Object object)
           
 String getAnnotation()
           
 Annotation getAnnotationInstance()
          Get the annotation using the thread context classloader
 Annotation getAnnotationInstance(ClassLoader cl)
          Get the annotation using passed in classloader
 Iterator<? extends MetaDataVisitorNode> getChildren()
          Return the child nodes
protected  int getHashCode()
           
 void initialVisit(MetaDataVisitor visitor)
          Visit the node
 boolean isReplace()
           
 Annotation removeAnnotation()
          Retrieve any cached annotation and flush it
 void setAnnotation(String annotation)
           
 void setReplace(boolean replace)
           
 void toShortString(org.jboss.util.JBossStringBuilder buffer)
           
 void toString(org.jboss.util.JBossStringBuilder buffer)
           
 
Methods inherited from class org.jboss.util.JBossObject
cacheGetHashCode, cacheToString, equals, flushJBossObjectCache, getClassShortName, hashCode, list, notEqual, toShortString, toString, toStringImplementation
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.util.JBossInterface
toShortString
 

Field Detail

annotation

public String annotation
Constructor Detail

AbstractAnnotationMetaData

public AbstractAnnotationMetaData()
Create a new annotation meta data


AbstractAnnotationMetaData

public AbstractAnnotationMetaData(String annotation)
Method Detail

getAnnotation

public String getAnnotation()

setAnnotation

public void setAnnotation(String annotation)

isReplace

public boolean isReplace()

setReplace

public void setReplace(boolean replace)

getAnnotationInstance

public Annotation getAnnotationInstance()
Description copied from interface: AnnotationMetaData
Get the annotation using the thread context classloader

Specified by:
getAnnotationInstance in interface AnnotationMetaData
Returns:
The annotation instance

getAnnotationInstance

public Annotation getAnnotationInstance(ClassLoader cl)
Description copied from interface: AnnotationMetaData
Get the annotation using passed in classloader

Specified by:
getAnnotationInstance in interface AnnotationMetaData
Parameters:
cl - The classloader
Returns:
The annotation instance

removeAnnotation

public Annotation removeAnnotation()
Description copied from interface: CachingAnnotationMetaData
Retrieve any cached annotation and flush it

Specified by:
removeAnnotation in interface CachingAnnotationMetaData
Returns:
the annotation instance or null if non was constructed

initialVisit

public void initialVisit(MetaDataVisitor visitor)
Description copied from interface: MetaDataVisitorNode
Visit the node

Specified by:
initialVisit in interface MetaDataVisitorNode
Parameters:
visitor - the visitor

describeVisit

public void describeVisit(MetaDataVisitor vistor)
Description copied from interface: MetaDataVisitorNode
Revisit the node

Specified by:
describeVisit in interface MetaDataVisitorNode
Parameters:
vistor - the visitor

getChildren

public Iterator<? extends MetaDataVisitorNode> getChildren()
Description copied from interface: MetaDataVisitorNode
Return the child nodes

Specified by:
getChildren in interface MetaDataVisitorNode
Returns:
Iterator or null if there aren't any

toString

public void toString(org.jboss.util.JBossStringBuilder buffer)
Overrides:
toString in class org.jboss.util.JBossObject

toShortString

public void toShortString(org.jboss.util.JBossStringBuilder buffer)
Specified by:
toShortString in interface org.jboss.util.JBossInterface
Overrides:
toShortString in class org.jboss.util.JBossObject

getHashCode

protected int getHashCode()
Overrides:
getHashCode in class org.jboss.util.JBossObject

equals

public boolean equals(Object object)
Overrides:
equals in class Object

clone

public AbstractAnnotationMetaData clone()
Description copied from interface: MetaDataVisitorNode
Clone the object

Specified by:
clone in interface MetaDataVisitorNode
Specified by:
clone in interface org.jboss.util.JBossInterface
Overrides:
clone in class org.jboss.util.JBossObject
Returns:
a clone of the object


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