org.jboss.deployers.plugins.annotations
Class ClassElement<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.ClassElement<A,M>
Type Parameters:
A - the annotation type
M - the annotated element type
All Implemented Interfaces:
Cloneable, Element<A,M>, org.jboss.util.JBossInterface

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

Class annotations element.

Author:
Ales Justin

Field Summary
 
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
ClassElement(ClassLoader classLoader, String className, Class<A> annClass, A annotation)
           
 
Method Summary
 M getAnnotatedElement()
          Get the annotated element that holds the annotation.
protected  ClassLoader getClassLoader()
          Get the classloader from weak ref.
protected  Class<?> loadClass(String className)
          Load class from class name.
 
Methods inherited from class org.jboss.deployers.plugins.annotations.AbstractElement
equals, getAnnotation, getHashCode, 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
 

Constructor Detail

ClassElement

public ClassElement(ClassLoader classLoader,
                    String className,
                    Class<A> annClass,
                    A annotation)
Method Detail

getAnnotatedElement

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

Returns:
the annotated element instance

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.