T
- The annotation type.public class AnnotationInfo<T extends Annotation> extends Object
Modifier | Constructor and Description |
---|---|
protected |
AnnotationInfo(ClassInfo c,
MethodInfo m,
Package p,
T a)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
T |
getAnnotation()
Returns the annotation found.
|
ClassInfo |
getClassInfo()
Returns the class that this annotation was found on.
|
ClassInfo |
getClassOn()
Returns the class where the annotation was found.
|
ConfigApply<Annotation> |
getConfigApply(VarResolverSession vrs)
If this annotation has a
PropertyStoreApply annotation, returns an instance of the specified ConfigApply class. |
MethodInfo |
getMethodOn()
Returns the method where the annotation was found.
|
Package |
getPackageOn()
Returns the package where the annotation was found.
|
boolean |
hasAnnotation(Class<? extends Annotation> a)
Returns
|
boolean |
isType(Class<? extends Annotation> a)
Returns
|
static <T extends Annotation> |
of(ClassInfo c,
T a)
Convenience constructor when annotation is found on a class.
|
static <T extends Annotation> |
of(MethodInfo m,
T a)
Convenience constructor when annotation is found on a method.
|
static <T extends Annotation> |
of(Package p,
T a)
Convenience constructor when annotation is found on a package.
|
ObjectMap |
toObjectMap()
Converts this object to a readable JSON object for debugging purposes.
|
String |
toString() |
protected AnnotationInfo(ClassInfo c, MethodInfo m, Package p, T a)
c
- The class where the annotation was found.m
- The method where the annotation was found.p
- The package where the annotation was found.a
- The annotation found.public static <T extends Annotation> AnnotationInfo<T> of(ClassInfo c, T a)
c
- The class where the annotation was found.a
- The annotation found.AnnotationInfo
object.public static <T extends Annotation> AnnotationInfo<T> of(MethodInfo m, T a)
m
- The method where the annotation was found.a
- The annotation found.AnnotationInfo
object.public static <T extends Annotation> AnnotationInfo<T> of(Package p, T a)
p
- The package where the annotation was found.a
- The annotation found.AnnotationInfo
object.public ClassInfo getClassOn()
public MethodInfo getMethodOn()
public Package getPackageOn()
public T getAnnotation()
public ObjectMap toObjectMap()
public ConfigApply<Annotation> getConfigApply(VarResolverSession vrs) throws ExecutableException
PropertyStoreApply
annotation, returns an instance of the specified ConfigApply
class.vrs
- Variable resolver passed to the ConfigApply
object.ConfigApply
object. Never ExecutableException
- Exception occurred on invoked constructor/method/field.public ClassInfo getClassInfo()
public boolean isType(Class<? extends Annotation> a)
a
- The type to test against.public boolean hasAnnotation(Class<? extends Annotation> a)
a
- The annotation to test for.Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.