public final class AnnotatedClassFinder
extends java.lang.Object
| Constructor and Description |
|---|
AnnotatedClassFinder(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Create a new instance with the
annotationType to find. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Class<?> |
findFromClass(java.lang.Class<?> source)
Find the first
Class that is annotated with the target annotation, starting
from the package defined by the given source up to the root. |
java.lang.Class<?> |
findFromPackage(java.lang.String source)
Find the first
Class that is annotated with the target annotation, starting
from the package defined by the given source up to the root. |
public AnnotatedClassFinder(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
annotationType to find.annotationType - the annotation to findpublic java.lang.Class<?> findFromClass(java.lang.Class<?> source)
Class that is annotated with the target annotation, starting
from the package defined by the given source up to the root.source - the source class to use to initiate the searchClass annotated with the target annotation within the
hierarchy defined by the given source or null if none is found.public java.lang.Class<?> findFromPackage(java.lang.String source)
Class that is annotated with the target annotation, starting
from the package defined by the given source up to the root.source - the source package to use to initiate the searchClass annotated with the target annotation within the
hierarchy defined by the given source or null if none is found.