public class AnnotatedDeclaration extends Object
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static AnnotatedDeclaration |
from(Class<?> generatedClass)
Creates a new
AnnotatedDeclaration from the given class. |
<T extends Annotation> |
get(Class<T> annotationClass)
Returns the specified annotation if present.
|
ClassLoader |
getClassLoader()
Returns the
ClassLoader from the this annotated type. |
String |
getDeclarationClassName() |
List<AnnotatedElement> |
getDeclaredElements() |
List<Field> |
getDeclaredFields()
Returns all fields that are declared in this type.
|
List<Method> |
getDeclaredMethods()
Returns all methods that are declared in this type.
|
Class<?> |
getImplementationClass()
Returns the implementation class of this type.
|
Class<?> |
getPublishedInterface()
Returns the published interface of this type.
|
int |
hashCode() |
boolean |
is(Class<? extends Annotation> annotationClass)
Returns
true if this represented type is annotated with the specified annotation
class. |
public static AnnotatedDeclaration from(Class<?> generatedClass)
AnnotatedDeclaration from the given class. The given class is either an
implementation or a published interface.generatedClass - The class that was generated for the model typeAnnotatedDeclaration for the given generated classpublic boolean is(Class<? extends Annotation> annotationClass)
true if this represented type is annotated with the specified annotation
class.annotationClass - The annotation class that should be presenttrue if the annotation is present else falsepublic <T extends Annotation> T get(Class<T> annotationClass)
null if it is not present.
Use #is(Class) to check whether the annotation is present or notannotationClass - The class of the requested annotationpublic List<Field> getDeclaredFields()
public List<Method> getDeclaredMethods()
public List<AnnotatedElement> getDeclaredElements()
public ClassLoader getClassLoader()
ClassLoader from the this annotated type. This ClassLoader could
be used to load further resources like corresponding property files.public Class<?> getImplementationClass()
public Class<?> getPublishedInterface()
public String getDeclarationClassName()
Copyright © 2017. All rights reserved.