org.jboss.deployers.plugins.annotations
Class DefaultElement<A extends Annotation,M extends AnnotatedElement>

java.lang.Object
  extended by org.jboss.util.JBossObject
      extended by org.jboss.deployers.plugins.annotations.AbstractElement<A,M>
          extended by org.jboss.deployers.plugins.annotations.DefaultElement<A,M>
Type Parameters:
A - the annotation type
M - the annotated element type
All Implemented Interfaces:
Cloneable, Element<A,M>, org.jboss.util.JBossInterface
Direct Known Subclasses:
ParametersElement

public class DefaultElement<A extends Annotation,M extends AnnotatedElement>
extends AbstractElement<A,M>

Default annotations element.

Author:
Ales Justin

Field Summary
protected  Class<M> aoClass
           
protected  org.jboss.metadata.spi.signature.Signature signature
           
 
Fields inherited from class org.jboss.deployers.plugins.annotations.AbstractElement
annClass, className
 
Fields inherited from class org.jboss.util.JBossObject
hashCode, log, toString
 
Constructor Summary
DefaultElement(ClassLoader classLoader, String className, org.jboss.metadata.spi.signature.Signature signature, Class<A> annClass, A annotation, Class<M> aoClass)
           
 
Method Summary
 boolean equals(Object obj)
           
 M getAnnotatedElement()
          Get the annotated element that holds the annotation.
protected  ClassLoader getClassLoader()
          Get the classloader from weak ref.
 int getHashCode()
           
protected  Class<?> loadClass(String className)
          Load class from class name.
 
Methods inherited from class org.jboss.deployers.plugins.annotations.AbstractElement
getAnnotation, getOwner, getOwnerClassName, readAnnotation
 
Methods inherited from class org.jboss.util.JBossObject
cacheGetHashCode, cacheToString, clone, equals, flushJBossObjectCache, getClassShortName, hashCode, list, notEqual, toShortString, toShortString, toString, toString, toStringImplementation
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

signature

protected org.jboss.metadata.spi.signature.Signature signature

aoClass

protected Class<M extends AnnotatedElement> aoClass
Constructor Detail

DefaultElement

public DefaultElement(ClassLoader classLoader,
                      String className,
                      org.jboss.metadata.spi.signature.Signature signature,
                      Class<A> annClass,
                      A annotation,
                      Class<M> aoClass)
Method Detail

getAnnotatedElement

public M getAnnotatedElement()
Description copied from interface: Element
Get the annotated element that holds the annotation.

Returns:
the annotated element instance

getHashCode

public int getHashCode()
Overrides:
getHashCode in class AbstractElement<A extends Annotation,M extends AnnotatedElement>

equals

public boolean equals(Object obj)
Overrides:
equals in class AbstractElement<A extends Annotation,M extends AnnotatedElement>

getClassLoader

protected ClassLoader getClassLoader()
Get the classloader from weak ref.

Returns:
the classloader

loadClass

protected Class<?> loadClass(String className)
Load class from class name.

Parameters:
className - the class name
Returns:
loaded class


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