public class AnnotationFinder extends Object implements IAnnotationFinder
Modifier and Type | Class and Description |
---|---|
class |
AnnotationFinder.Annotatable |
class |
AnnotationFinder.AnnotationInfo |
class |
AnnotationFinder.ClassInfo |
class |
AnnotationFinder.FieldInfo |
static interface |
AnnotationFinder.Info |
class |
AnnotationFinder.InfoBuildingVisitor |
class |
AnnotationFinder.MethodInfo |
class |
AnnotationFinder.PackageInfo |
class |
AnnotationFinder.ParameterInfo |
class |
AnnotationFinder.SubArchive |
Modifier and Type | Field and Description |
---|---|
protected Map<String,List<AnnotationFinder.Info>> |
annotated |
protected Map<String,AnnotationFinder.ClassInfo> |
classInfos |
protected Map<String,AnnotationFinder.ClassInfo> |
originalInfos |
Constructor and Description |
---|
AnnotationFinder(Archive archive) |
AnnotationFinder(Archive archive,
boolean checkRuntimeAnnotation) |
protected final Map<String,List<AnnotationFinder.Info>> annotated
protected final Map<String,AnnotationFinder.ClassInfo> classInfos
protected final Map<String,AnnotationFinder.ClassInfo> originalInfos
public AnnotationFinder(Archive archive, boolean checkRuntimeAnnotation)
archive
- checkRuntimeAnnotation
- Has no effect on findMetaAnnotated* methodspublic AnnotationFinder(Archive archive)
protected Map<String,List<AnnotationFinder.Info>> newAnnotatedMap()
protected Map<String,AnnotationFinder.ClassInfo> newClassInfoMap()
public boolean hasMetaAnnotations()
public List<String> getAnnotatedClassNames()
getAnnotatedClassNames
in interface IAnnotationFinder
public Archive getArchive()
public AnnotationFinder link()
IOException
public AnnotationFinder enableMetaAnnotations()
public AnnotationFinder enableFindImplementations()
public AnnotationFinder enableFindSubclasses()
protected void linkParent(AnnotationFinder.ClassInfo classInfo)
protected boolean isJvm(String name)
protected void linkInterfaces(AnnotationFinder.ClassInfo classInfo)
public boolean isAnnotationPresent(Class<? extends Annotation> annotation)
isAnnotationPresent
in interface IAnnotationFinder
public List<String> getClassesNotLoaded()
getClassesNotLoaded
in interface IAnnotationFinder
public List<Package> findAnnotatedPackages(Class<? extends Annotation> annotation)
findAnnotatedPackages
in interface IAnnotationFinder
public List<Class<?>> findAnnotatedClasses(Class<? extends Annotation> annotation)
findAnnotatedClasses
in interface IAnnotationFinder
public List<Annotated<Class<?>>> findMetaAnnotatedClasses(Class<? extends Annotation> annotation)
findMetaAnnotatedClasses
in interface IAnnotationFinder
public List<Class<?>> findInheritedAnnotatedClasses(Class<? extends Annotation> annotation)
findInheritedAnnotatedClasses
in interface IAnnotationFinder
annotation
- public List<Method> findAnnotatedMethods(Class<? extends Annotation> annotation)
findAnnotatedMethods
in interface IAnnotationFinder
public List<Parameter<Method>> findAnnotatedMethodParameters(Class<? extends Annotation> annotation)
public List<Annotated<Method>> findMetaAnnotatedMethods(Class<? extends Annotation> annotation)
findMetaAnnotatedMethods
in interface IAnnotationFinder
public List<Annotated<Field>> findMetaAnnotatedFields(Class<? extends Annotation> annotation)
findMetaAnnotatedFields
in interface IAnnotationFinder
public List<Constructor> findAnnotatedConstructors(Class<? extends Annotation> annotation)
findAnnotatedConstructors
in interface IAnnotationFinder
public List<Parameter<Constructor<?>>> findAnnotatedConstructorParameters(Class<? extends Annotation> annotation)
public List<Field> findAnnotatedFields(Class<? extends Annotation> annotation)
findAnnotatedFields
in interface IAnnotationFinder
public List<Class<?>> findClassesInPackage(String packageName, boolean recursive)
findClassesInPackage
in interface IAnnotationFinder
public <T> List<Class<? extends T>> findSubclasses(Class<T> clazz)
findSubclasses
in interface IAnnotationFinder
public <T> List<Class<? extends T>> findImplementations(Class<T> clazz)
findImplementations
in interface IAnnotationFinder
protected List<AnnotationFinder.Info> getAnnotationInfos(String name)
protected List<AnnotationFinder.Info> initAnnotationInfos(String name)
protected void readClassDef(String className)
protected void readClassDef(InputStream in) throws IOException
IOException
protected void readClassDef(Class clazz)
public AnnotationFinder select(Class<?>... clazz)
public AnnotationFinder select(String... clazz)
public AnnotationFinder select(Iterable<String> clazz)
Copyright © 2005–2023. All rights reserved.