public abstract class AbstractFinder extends java.lang.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 java.util.Map<java.lang.String,AbstractFinder.ClassInfo> |
classInfos |
protected java.util.Map<java.lang.String,AbstractFinder.ClassInfo> |
originalInfos |
| Constructor and Description |
|---|
AbstractFinder() |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.Class<?>> |
findAnnotatedClasses(java.lang.Class<? extends java.lang.annotation.Annotation> annotation) |
java.util.List<java.lang.reflect.Constructor> |
findAnnotatedConstructors(java.lang.Class<? extends java.lang.annotation.Annotation> annotation) |
java.util.List<java.lang.reflect.Field> |
findAnnotatedFields(java.lang.Class<? extends java.lang.annotation.Annotation> annotation) |
java.util.List<java.lang.reflect.Method> |
findAnnotatedMethods(java.lang.Class<? extends java.lang.annotation.Annotation> annotation) |
java.util.List<java.lang.Package> |
findAnnotatedPackages(java.lang.Class<? extends java.lang.annotation.Annotation> annotation) |
java.util.List<java.lang.Class<?>> |
findClassesInPackage(java.lang.String packageName,
boolean recursive) |
<T> java.util.List<java.lang.Class<? extends T>> |
findImplementations(java.lang.Class<T> clazz) |
java.util.List<java.lang.Class<?>> |
findInheritedAnnotatedClasses(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Naive implementation - works extremelly slow O(n^3)
|
java.util.List<Annotated<java.lang.Class<?>>> |
findMetaAnnotatedClasses(java.lang.Class<? extends java.lang.annotation.Annotation> annotation) |
java.util.List<Annotated<java.lang.reflect.Field>> |
findMetaAnnotatedFields(java.lang.Class<? extends java.lang.annotation.Annotation> annotation) |
java.util.List<Annotated<java.lang.reflect.Method>> |
findMetaAnnotatedMethods(java.lang.Class<? extends java.lang.annotation.Annotation> annotation) |
<T> java.util.List<java.lang.Class<? extends T>> |
findSubclasses(java.lang.Class<T> clazz) |
java.util.List<java.lang.String> |
getAnnotatedClassNames() |
protected java.util.List<AbstractFinder.Info> |
getAnnotationInfos(java.lang.String name) |
java.util.List<java.lang.String> |
getClassesNotLoaded()
Returns a list of classes that could not be loaded in last invoked findAnnotated* method.
|
protected abstract java.net.URL |
getResource(java.lang.String className) |
boolean |
isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotation) |
AbstractFinder |
link()
The link() method must be called to successfully use the findSubclasses and findImplementations methods
|
protected abstract java.lang.Class<?> |
loadClass(java.lang.String fixedName) |
protected void |
readClassDef(java.lang.Class clazz) |
protected void |
readClassDef(java.io.InputStream in) |
protected void |
readClassDef(java.io.InputStream in,
java.lang.String path) |
protected void |
readClassDef(java.lang.String className) |
protected final java.util.Map<java.lang.String,AbstractFinder.ClassInfo> classInfos
protected final java.util.Map<java.lang.String,AbstractFinder.ClassInfo> originalInfos
protected abstract java.net.URL getResource(java.lang.String className)
protected abstract java.lang.Class<?> loadClass(java.lang.String fixedName)
throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundExceptionpublic java.util.List<java.lang.String> getAnnotatedClassNames()
getAnnotatedClassNames in interface IAnnotationFinderpublic AbstractFinder link() throws java.io.IOException
java.io.IOExceptionpublic boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
isAnnotationPresent in interface IAnnotationFinderpublic java.util.List<java.lang.String> getClassesNotLoaded()
getClassesNotLoaded in interface IAnnotationFinderpublic java.util.List<java.lang.Package> findAnnotatedPackages(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
findAnnotatedPackages in interface IAnnotationFinderpublic java.util.List<java.lang.Class<?>> findAnnotatedClasses(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
findAnnotatedClasses in interface IAnnotationFinderpublic java.util.List<Annotated<java.lang.Class<?>>> findMetaAnnotatedClasses(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
findMetaAnnotatedClasses in interface IAnnotationFinderpublic java.util.List<java.lang.Class<?>> findInheritedAnnotatedClasses(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
findInheritedAnnotatedClasses in interface IAnnotationFinderannotation - public java.util.List<java.lang.reflect.Method> findAnnotatedMethods(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
findAnnotatedMethods in interface IAnnotationFinderpublic java.util.List<Annotated<java.lang.reflect.Method>> findMetaAnnotatedMethods(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
findMetaAnnotatedMethods in interface IAnnotationFinderpublic java.util.List<java.lang.reflect.Constructor> findAnnotatedConstructors(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
findAnnotatedConstructors in interface IAnnotationFinderpublic java.util.List<java.lang.reflect.Field> findAnnotatedFields(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
findAnnotatedFields in interface IAnnotationFinderpublic java.util.List<Annotated<java.lang.reflect.Field>> findMetaAnnotatedFields(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
findMetaAnnotatedFields in interface IAnnotationFinderpublic java.util.List<java.lang.Class<?>> findClassesInPackage(java.lang.String packageName,
boolean recursive)
findClassesInPackage in interface IAnnotationFinderpublic <T> java.util.List<java.lang.Class<? extends T>> findSubclasses(java.lang.Class<T> clazz)
findSubclasses in interface IAnnotationFinderpublic <T> java.util.List<java.lang.Class<? extends T>> findImplementations(java.lang.Class<T> clazz)
findImplementations in interface IAnnotationFinderprotected java.util.List<AbstractFinder.Info> getAnnotationInfos(java.lang.String name)
protected void readClassDef(java.lang.String className)
protected void readClassDef(java.io.InputStream in)
throws java.io.IOException
java.io.IOExceptionprotected void readClassDef(java.io.InputStream in,
java.lang.String path)
throws java.io.IOException
java.io.IOExceptionprotected void readClassDef(java.lang.Class clazz)