public class ClassDescription
extends java.lang.Object
ClassDescription
is describing the found annotations
of a class.
Its basically used as a wrapper to hold all the various annotations
found in a class. This description only contains the annotations
found in the current class, but not in any superclass.
The annotations are available as descriptions.Constructor and Description |
---|
ClassDescription(java.lang.Class<?> describedClass,
java.lang.String source)
Create a new class description
|
Modifier and Type | Method and Description |
---|---|
void |
add(AbstractDescription desc)
Add a new description
|
ClassDescription |
clone() |
java.lang.Class<?> |
getDescribedClass()
Get the associated class.
|
<T extends AbstractDescription> |
getDescription(java.lang.Class<T> descType)
Get the first description of that type
|
<T extends AbstractDescription> |
getDescriptions(java.lang.Class<T> descType)
Get all descriptions of that type.
|
java.lang.String |
getSource()
Get the location information like the source file etc.
|
java.lang.String |
toString() |
public ClassDescription(java.lang.Class<?> describedClass, java.lang.String source)
public java.lang.Class<?> getDescribedClass()
public java.lang.String getSource()
public void add(AbstractDescription desc)
public <T extends AbstractDescription> java.util.List<T> getDescriptions(java.lang.Class<T> descType)
descType
- The description class.public <T extends AbstractDescription> T getDescription(java.lang.Class<T> descType)
descType
- The description classnull
public java.lang.String toString()
toString
in class java.lang.Object
public ClassDescription clone()
clone
in class java.lang.Object
Copyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.