public abstract class AbstractFinder extends Object implements IAnnotationFinder
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractFinder.Annotatable |
class |
AbstractFinder.AnnotationInfo |
class |
AbstractFinder.ClassInfo |
class |
AbstractFinder.FieldInfo |
static class |
AbstractFinder.GenericAwareInfoBuildingVisitor |
static interface |
AbstractFinder.Info |
class |
AbstractFinder.InfoBuildingVisitor |
class |
AbstractFinder.MethodInfo |
class |
AbstractFinder.PackageInfo |
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,AbstractFinder.ClassInfo> |
classInfos |
protected Map<String,AbstractFinder.ClassInfo> |
originalInfos |
| Constructor and Description |
|---|
AbstractFinder() |
| Modifier and Type | Method and Description |
|---|---|
List<Class<?>> |
findAnnotatedClasses(Class<? extends Annotation> annotation) |
List<Constructor> |
findAnnotatedConstructors(Class<? extends Annotation> annotation) |
List<Field> |
findAnnotatedFields(Class<? extends Annotation> annotation) |
List<Method> |
findAnnotatedMethods(Class<? extends Annotation> annotation) |
List<Package> |
findAnnotatedPackages(Class<? extends Annotation> annotation) |
List<Class<?>> |
findClassesInPackage(String packageName,
boolean recursive) |
<T> List<Class<? extends T>> |
findImplementations(Class<T> clazz) |
List<Class<?>> |
findInheritedAnnotatedClasses(Class<? extends Annotation> annotation)
Naive implementation - works extremelly slow O(n^3)
|
List<Annotated<Class<?>>> |
findMetaAnnotatedClasses(Class<? extends Annotation> annotation) |
List<Annotated<Field>> |
findMetaAnnotatedFields(Class<? extends Annotation> annotation) |
List<Annotated<Method>> |
findMetaAnnotatedMethods(Class<? extends Annotation> annotation) |
<T> List<Class<? extends T>> |
findSubclasses(Class<T> clazz) |
List<String> |
getAnnotatedClassNames() |
protected List<AbstractFinder.Info> |
getAnnotationInfos(String name) |
List<String> |
getClassesNotLoaded()
Returns a list of classes that could not be loaded in last invoked findAnnotated* method.
|
protected abstract URL |
getResource(String className) |
boolean |
isAnnotationPresent(Class<? extends Annotation> annotation) |
AbstractFinder |
link()
The link() method must be called to successfully use the findSubclasses and findImplementations methods
|
protected abstract Class<?> |
loadClass(String fixedName) |
protected void |
readClassDef(Class clazz) |
protected void |
readClassDef(InputStream in) |
protected void |
readClassDef(InputStream in,
String path) |
protected void |
readClassDef(String className) |
protected final Map<String,AbstractFinder.ClassInfo> classInfos
protected final Map<String,AbstractFinder.ClassInfo> originalInfos
protected abstract Class<?> loadClass(String fixedName) throws ClassNotFoundException
ClassNotFoundExceptionpublic List<String> getAnnotatedClassNames()
getAnnotatedClassNames in interface IAnnotationFinderpublic AbstractFinder link() throws IOException
IOExceptionpublic boolean isAnnotationPresent(Class<? extends Annotation> annotation)
isAnnotationPresent in interface IAnnotationFinderpublic List<String> getClassesNotLoaded()
getClassesNotLoaded in interface IAnnotationFinderpublic List<Package> findAnnotatedPackages(Class<? extends Annotation> annotation)
findAnnotatedPackages in interface IAnnotationFinderpublic List<Class<?>> findAnnotatedClasses(Class<? extends Annotation> annotation)
findAnnotatedClasses in interface IAnnotationFinderpublic List<Annotated<Class<?>>> findMetaAnnotatedClasses(Class<? extends Annotation> annotation)
findMetaAnnotatedClasses in interface IAnnotationFinderpublic List<Class<?>> findInheritedAnnotatedClasses(Class<? extends Annotation> annotation)
findInheritedAnnotatedClasses in interface IAnnotationFinderannotation - public List<Method> findAnnotatedMethods(Class<? extends Annotation> annotation)
findAnnotatedMethods in interface IAnnotationFinderpublic List<Annotated<Method>> findMetaAnnotatedMethods(Class<? extends Annotation> annotation)
findMetaAnnotatedMethods in interface IAnnotationFinderpublic List<Constructor> findAnnotatedConstructors(Class<? extends Annotation> annotation)
findAnnotatedConstructors in interface IAnnotationFinderpublic List<Field> findAnnotatedFields(Class<? extends Annotation> annotation)
findAnnotatedFields in interface IAnnotationFinderpublic List<Annotated<Field>> findMetaAnnotatedFields(Class<? extends Annotation> annotation)
findMetaAnnotatedFields in interface IAnnotationFinderpublic List<Class<?>> findClassesInPackage(String packageName, boolean recursive)
findClassesInPackage in interface IAnnotationFinderpublic <T> List<Class<? extends T>> findSubclasses(Class<T> clazz)
findSubclasses in interface IAnnotationFinderpublic <T> List<Class<? extends T>> findImplementations(Class<T> clazz)
findImplementations in interface IAnnotationFinderprotected List<AbstractFinder.Info> getAnnotationInfos(String name)
protected void readClassDef(String className)
protected void readClassDef(InputStream in) throws IOException
IOExceptionprotected void readClassDef(InputStream in, String path) throws IOException
IOExceptionprotected void readClassDef(Class clazz)
Copyright © 2005-2014 The Apache Software Foundation. All Rights Reserved.