IAnnotationFinder
public class AnnotationFinder extends java.lang.Object implements IAnnotationFinder
Modifier and Type | Class | Description |
---|---|---|
class |
AnnotationFinder.Annotatable |
|
class |
AnnotationFinder.AnnotationInfo |
|
class |
AnnotationFinder.ClassInfo |
|
class |
AnnotationFinder.FieldInfo |
|
static class |
AnnotationFinder.GenericAwareInfoBuildingVisitor |
|
static interface |
AnnotationFinder.Info |
|
class |
AnnotationFinder.InfoBuildingVisitor |
|
class |
AnnotationFinder.MethodInfo |
|
class |
AnnotationFinder.PackageInfo |
|
class |
AnnotationFinder.ParameterInfo |
|
class |
AnnotationFinder.SubArchive |
Modifier and Type | Field | Description |
---|---|---|
protected java.util.Map<java.lang.String,java.util.List<AnnotationFinder.Info>> |
annotated |
|
protected java.util.Map<java.lang.String,AnnotationFinder.ClassInfo> |
classInfos |
|
protected java.util.Map<java.lang.String,AnnotationFinder.ClassInfo> |
originalInfos |
Constructor | Description |
---|---|
AnnotationFinder(Archive archive) |
|
AnnotationFinder(Archive archive,
boolean checkRuntimeAnnotation) |
Modifier and Type | Method | Description |
---|---|---|
AnnotationFinder |
enableFindImplementations() |
|
AnnotationFinder |
enableFindSubclasses() |
|
AnnotationFinder |
enableMetaAnnotations() |
|
java.util.List<java.lang.Class<?>> |
findAnnotatedClasses(java.lang.Class<? extends java.lang.annotation.Annotation> annotation) |
|
java.util.List<Parameter<java.lang.reflect.Constructor<?>>> |
findAnnotatedConstructorParameters(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<Parameter<java.lang.reflect.Method>> |
findAnnotatedMethodParameters(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<AnnotationFinder.Info> |
getAnnotationInfos(java.lang.String name) |
|
Archive |
getArchive() |
|
java.util.List<java.lang.String> |
getClassesNotLoaded() |
Returns a list of classes that could not be loaded in last invoked findAnnotated* method.
|
boolean |
hasMetaAnnotations() |
|
protected java.util.List<AnnotationFinder.Info> |
initAnnotationInfos(java.lang.String name) |
|
boolean |
isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotation) |
|
protected boolean |
isJvm(java.lang.String name) |
|
AnnotationFinder |
link() |
The link() method must be called to successfully use the findSubclasses and findImplementations methods
|
protected void |
linkInterfaces(AnnotationFinder.ClassInfo classInfo) |
|
protected void |
linkParent(AnnotationFinder.ClassInfo classInfo) |
|
protected java.util.Map<java.lang.String,java.util.List<AnnotationFinder.Info>> |
newAnnotatedMap() |
|
protected java.util.Map<java.lang.String,AnnotationFinder.ClassInfo> |
newClassInfoMap() |
|
protected void |
readClassDef(java.io.InputStream in) |
|
protected void |
readClassDef(java.lang.Class clazz) |
|
protected void |
readClassDef(java.lang.String className) |
|
AnnotationFinder |
select(java.lang.Class<?>... clazz) |
|
AnnotationFinder |
select(java.lang.Iterable<java.lang.String> clazz) |
|
AnnotationFinder |
select(java.lang.String... clazz) |
protected final java.util.Map<java.lang.String,java.util.List<AnnotationFinder.Info>> annotated
protected final java.util.Map<java.lang.String,AnnotationFinder.ClassInfo> classInfos
protected final java.util.Map<java.lang.String,AnnotationFinder.ClassInfo> originalInfos
public AnnotationFinder(Archive archive, boolean checkRuntimeAnnotation)
archive
- checkRuntimeAnnotation
- Has no effect on findMetaAnnotated* methodspublic AnnotationFinder(Archive archive)
protected java.util.Map<java.lang.String,java.util.List<AnnotationFinder.Info>> newAnnotatedMap()
protected java.util.Map<java.lang.String,AnnotationFinder.ClassInfo> newClassInfoMap()
public boolean hasMetaAnnotations()
public java.util.List<java.lang.String> getAnnotatedClassNames()
getAnnotatedClassNames
in interface IAnnotationFinder
public Archive getArchive()
public AnnotationFinder link()
java.io.IOException
public AnnotationFinder enableMetaAnnotations()
public AnnotationFinder enableFindImplementations()
public AnnotationFinder enableFindSubclasses()
protected void linkParent(AnnotationFinder.ClassInfo classInfo)
protected boolean isJvm(java.lang.String name)
protected void linkInterfaces(AnnotationFinder.ClassInfo classInfo)
public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
isAnnotationPresent
in interface IAnnotationFinder
public java.util.List<java.lang.String> getClassesNotLoaded()
getClassesNotLoaded
in interface IAnnotationFinder
public java.util.List<java.lang.Package> findAnnotatedPackages(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
findAnnotatedPackages
in interface IAnnotationFinder
public java.util.List<java.lang.Class<?>> findAnnotatedClasses(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
findAnnotatedClasses
in interface IAnnotationFinder
public java.util.List<Annotated<java.lang.Class<?>>> findMetaAnnotatedClasses(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
findMetaAnnotatedClasses
in interface IAnnotationFinder
public java.util.List<java.lang.Class<?>> findInheritedAnnotatedClasses(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
findInheritedAnnotatedClasses
in interface IAnnotationFinder
annotation
- public java.util.List<java.lang.reflect.Method> findAnnotatedMethods(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
findAnnotatedMethods
in interface IAnnotationFinder
public java.util.List<Parameter<java.lang.reflect.Method>> findAnnotatedMethodParameters(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
public java.util.List<Annotated<java.lang.reflect.Method>> findMetaAnnotatedMethods(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
findMetaAnnotatedMethods
in interface IAnnotationFinder
public java.util.List<Annotated<java.lang.reflect.Field>> findMetaAnnotatedFields(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
findMetaAnnotatedFields
in interface IAnnotationFinder
public java.util.List<java.lang.reflect.Constructor> findAnnotatedConstructors(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
findAnnotatedConstructors
in interface IAnnotationFinder
public java.util.List<Parameter<java.lang.reflect.Constructor<?>>> findAnnotatedConstructorParameters(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
public java.util.List<java.lang.reflect.Field> findAnnotatedFields(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
findAnnotatedFields
in interface IAnnotationFinder
public java.util.List<java.lang.Class<?>> findClassesInPackage(java.lang.String packageName, boolean recursive)
findClassesInPackage
in interface IAnnotationFinder
public <T> java.util.List<java.lang.Class<? extends T>> findSubclasses(java.lang.Class<T> clazz)
findSubclasses
in interface IAnnotationFinder
public <T> java.util.List<java.lang.Class<? extends T>> findImplementations(java.lang.Class<T> clazz)
findImplementations
in interface IAnnotationFinder
protected java.util.List<AnnotationFinder.Info> getAnnotationInfos(java.lang.String name)
protected java.util.List<AnnotationFinder.Info> initAnnotationInfos(java.lang.String name)
protected void readClassDef(java.lang.String className)
protected void readClassDef(java.io.InputStream in) throws java.io.IOException
java.io.IOException
protected void readClassDef(java.lang.Class clazz)
public AnnotationFinder select(java.lang.Class<?>... clazz)
public AnnotationFinder select(java.lang.String... clazz)
public AnnotationFinder select(java.lang.Iterable<java.lang.String> clazz)
Copyright © 2005–2018. All rights reserved.