public abstract class AbstractFinder extends Object
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 List<AbstractFinder.ClassInfo> |
classInfos |
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) |
List<Class> |
findInheritedAnnotatedClasses(Class<? extends Annotation> annotation)
Naive implementation - works extremelly slow O(n^3)
|
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) |
protected abstract Class<?> |
loadClass(String fixedName) |
protected void |
readClassDef(InputStream in) |
protected final List<AbstractFinder.ClassInfo> classInfos
public AbstractFinder()
protected abstract URL getResource(String className)
protected abstract Class<?> loadClass(String fixedName) throws ClassNotFoundException
ClassNotFoundException
public boolean isAnnotationPresent(Class<? extends Annotation> annotation)
public List<String> getClassesNotLoaded()
public List<Package> findAnnotatedPackages(Class<? extends Annotation> annotation)
public List<Class> findAnnotatedClasses(Class<? extends Annotation> annotation)
public List<Class> findInheritedAnnotatedClasses(Class<? extends Annotation> annotation)
annotation
- public List<Method> findAnnotatedMethods(Class<? extends Annotation> annotation)
public List<Constructor> findAnnotatedConstructors(Class<? extends Annotation> annotation)
public List<Field> findAnnotatedFields(Class<? extends Annotation> annotation)
public List<Class> findClassesInPackage(String packageName, boolean recursive)
protected List<AbstractFinder.Info> getAnnotationInfos(String name)
protected void readClassDef(InputStream in) throws IOException
IOException
Copyright © 2005–2014. All rights reserved.