Comparable<ClassInfo>
public class ClassInfo extends Object implements Comparable<ClassInfo>
Modifier and Type | Method | Description |
---|---|---|
boolean |
annotatesClass(String annotatedClassName) |
Test whether this class annotates the named class.
|
boolean |
annotatesFieldOfClass(String className) |
Test whether this annotation annotates a field of the named class.
|
boolean |
annotatesMethodOfClass(String className) |
Test whether this annotation annotates or meta-annotates a method of the named class.
|
int |
compareTo(ClassInfo o) |
Compare based on class name.
|
boolean |
directlyAnnotatesClass(String directlyAnnotatedClassName) |
Test whether this class directly annotates the named class.
|
boolean |
directlyImplementsInterface(String interfaceName) |
Test whether this standard class directly implements the named interface, or by one of its superclasses.
|
boolean |
equals(Object obj) |
Use class name for equals().
|
List<AnnotationInfo.AnnotationParamValue> |
getAnnotationDefaultParamValues() |
Get a list of the default parameter values, if this is an annotation, and it has default parameter values.
|
List<AnnotationInfo> |
getAnnotationInfo() |
Get a list of annotations on this method, along with any annotation parameter values, wrapped in
AnnotationInfo objects, or the empty list if none. |
Set<ClassInfo> |
getAnnotations() |
Get the annotations and meta-annotations on this class.
|
Set<ClassInfo> |
getAnnotationsWithDirectMetaAnnotation() |
Get the annotations that have this direct meta-annotation.
|
Set<ClassInfo> |
getAnnotationsWithMetaAnnotation() |
Get the annotations that have this meta-annotation.
|
Set<ClassInfo> |
getClassesDirectlyImplementing() |
Get the classes that directly implement this interface, and their subclasses.
|
Set<ClassInfo> |
getClassesImplementing() |
Get the classes that implement this interface, and their subclasses.
|
Set<ClassInfo> |
getClassesWithAnnotation() |
Get the standard classes and non-annotation interfaces that are annotated by this annotation.
|
Set<ClassInfo> |
getClassesWithDirectAnnotation() |
Get the standard classes or non-annotation interfaces that are directly annotated with this annotation.
|
Set<ClassInfo> |
getClassesWithDirectFieldAnnotation() |
Get the classes that have a field with this direct annotation.
|
Set<ClassInfo> |
getClassesWithDirectMethodAnnotation() |
Get the classes that have a method with this direct annotation.
|
Set<ClassInfo> |
getClassesWithFieldAnnotation() |
Get the classes that have a field with this annotation or meta-annotation.
|
Set<ClassInfo> |
getClassesWithMethodAnnotation() |
Get the classes that have a method with this annotation or meta-annotation.
|
ClassLoader[] |
getClassLoaders() |
Deprecated.
|
int |
getClassModifiers() |
Get the class modifier flags, e.g.
|
String |
getClassName() |
Get the name of this class.
|
static List<String> |
getClassNames(Collection<ClassInfo> classInfoColl) |
Get the sorted list of the names of classes given a collection of
ClassInfo objects. |
Set<String> |
getClassNamesReferencedInAnyTypeDescriptor() |
Get the names of any classes (other than this class itself) referenced in this class' type descriptor, or the
type descriptors of fields or methods (if field or method info is recorded).
|
Set<String> |
getClassNamesReferencedInClassTypeDescriptor() |
Get the names of any classes (other than this class itself) referenced in the type descriptor of this class.
|
Set<String> |
getClassNamesReferencedInFieldTypeDescriptors() |
Get the names of any classes referenced in the type descriptors of this class' fields (if field info is
recorded).
|
Set<String> |
getClassNamesReferencedInMethodTypeDescriptors() |
Get the names of any classes referenced in the type descriptors of this class' methods (if method info is
recorded).
|
File |
getClasspathElementFile() |
The classpath element file (classpath root dir or jar) that this class was found within, or null if this
class was found in a module.
|
ModuleRef |
getClasspathElementModuleRef() |
The classpath element module that this class was found within, or null if this class was found in a directory
or jar.
|
URL |
getClasspathElementURL() |
The classpath element URL (for a classpath root dir, jar or module) that this class was found within.
|
Set<URL> |
getClasspathElementURLs() |
Deprecated.
|
Class<?> |
getClassRef() |
Get a class reference for this class.
|
<T> Class<T> |
getClassRef(Class<T> classType) |
Get a class reference for this class, casting it to the requested interface or superclass type.
|
List<MethodInfo> |
getConstructorInfo() |
Returns information on visible constructors of the class.
|
Set<ClassInfo> |
getDirectAnnotations() |
Get the direct annotations and meta-annotations on this class.
|
Set<ClassInfo> |
getDirectlyImplementedInterfaces() |
Get the interfaces directly implemented by this standard class.
|
Set<ClassInfo> |
getDirectSubclasses() |
Get the direct subclasses of this class.
|
Set<ClassInfo> |
getDirectSubinterfaces() |
Get the direct subinterfaces of this interface.
|
ClassInfo |
getDirectSuperclass() |
Convenience method for getting the single direct superclass of this class.
|
Set<ClassInfo> |
getDirectSuperclasses() |
Get the direct superclasses of this class.
|
Set<ClassInfo> |
getDirectSuperinterfaces() |
Get the direct superinterfaces of this interface.
|
Set<ClassInfo> |
getFieldAnnotations() |
Get the field annotations on this class.
|
List<FieldInfo> |
getFieldInfo() |
Returns information on all visible fields of the class.
|
FieldInfo |
getFieldInfo(String fieldName) |
Returns information on a given visible field of the class.
|
String |
getFullyQualifiedContainingMethodName() |
Get fully-qualified containing method name (i.e.
|
Set<ClassInfo> |
getImplementedInterfaces() |
Get the interfaces implemented by this standard class, or by one of its superclasses.
|
Set<ClassInfo> |
getInnerClasses() |
Returns the inner classes contained within this class.
|
List<String> |
getInnerClassNames() |
Returns the names of inner classes contained within this class.
|
Set<ClassInfo> |
getMetaAnnotations() |
Get the annotations and meta-annotations on this annotation class.
|
List<MethodInfo> |
getMethodAndConstructorInfo() |
Returns information on visible methods and constructors of the class.
|
Set<ClassInfo> |
getMethodAnnotations() |
Get the method annotations or meta-annotations on this class.
|
Set<ClassInfo> |
getMethodDirectAnnotations() |
Get the direct method direct annotations on this class.
|
List<MethodInfo> |
getMethodInfo() |
Returns information on visible methods of the class that are not constructors.
|
List<MethodInfo> |
getMethodInfo(String methodName) |
Returns information on the method(s) of the class with the given method name.
|
String |
getModifiersStr() |
Get the field modifiers as a String, e.g.
|
String |
getNameOfDirectSuperclass() |
Convenience method for getting the name of the single direct superclass of this class.
|
List<String> |
getNamesOfAnnotations() |
Get the names of annotations and meta-annotations on this class.
|
List<String> |
getNamesOfAnnotationsWithDirectMetaAnnotation() |
Get the names of annotations that have this direct meta-annotation.
|
List<String> |
getNamesOfAnnotationsWithMetaAnnotation() |
Get the names of annotations that have this meta-annotation.
|
List<String> |
getNamesOfClassesDirectlyImplementing() |
Get the names of classes that directly implement this interface, and the names of their subclasses.
|
List<String> |
getNamesOfClassesImplementing() |
Get the names of classes that implement this interface, and the names of their subclasses.
|
List<String> |
getNamesOfClassesWithAnnotation() |
Get the names of standard classes and non-annotation interfaces that are annotated by this annotation.
|
List<String> |
getNamesOfClassesWithDirectAnnotation() |
Get the names of standard classes or non-annotation interfaces that are directly annotated with this
annotation.
|
List<String> |
getNamesOfClassesWithDirectFieldAnnotation() |
Get the names of classes that have a field with this direct annotation.
|
List<String> |
getNamesOfClassesWithDirectMethodAnnotation() |
Get the names of classes that have a method with this direct annotation.
|
List<String> |
getNamesOfClassesWithFieldAnnotation() |
Get the names of classes that have a field with this annotation or meta-annotation.
|
List<String> |
getNamesOfClassesWithMethodAnnotation() |
Get the names of classes that have a method with this annotation.
|
List<String> |
getNamesOfDirectAnnotations() |
Get the names of direct annotations and meta-annotations on this class.
|
List<String> |
getNamesOfDirectlyImplementedInterfaces() |
Get the interfaces directly implemented by this standard class, or by one of its superclasses.
|
List<String> |
getNamesOfDirectSubclasses() |
Get the names of direct subclasses of this class.
|
List<String> |
getNamesOfDirectSubinterfaces() |
Get the names of direct subinterfaces of this interface.
|
List<String> |
getNamesOfDirectSuperclasses() |
Get the names of direct superclasses of this class.
|
List<String> |
getNamesOfDirectSuperinterfaces() |
Get the names of direct superinterfaces of this interface.
|
List<String> |
getNamesOfFieldAnnotations() |
Get the names of field annotations on this class.
|
List<String> |
getNamesOfImplementedInterfaces() |
Get the interfaces implemented by this standard class, or by one of its superclasses.
|
List<String> |
getNamesOfMetaAnnotations() |
Get the names of annotations and meta-annotations on this annotation class.
|
List<String> |
getNamesOfMethodAnnotations() |
Get the names of method annotations or meta-annotations on this class.
|
List<String> |
getNamesOfMethodDirectAnnotations() |
Get the names of method direct annotations on this class.
|
List<String> |
getNamesOfSubclasses() |
Get the names of subclasses of this class.
|
List<String> |
getNamesOfSubinterfaces() |
Get the names of subinterfaces of this interface.
|
List<String> |
getNamesOfSuperclasses() |
Get the names of all direct and indirect superclasses of this class (i.e.
|
List<String> |
getNamesOfSuperinterfaces() |
Get the names of superinterfaces of this interface.
|
Set<ClassInfo> |
getOuterClasses() |
Returns the containing outer classes, for inner classes.
|
List<String> |
getOuterClassName() |
Returns the names of the containing outer classes, for inner classes.
|
Set<ClassInfo> |
getSubclasses() |
Get the subclasses of this class.
|
Set<ClassInfo> |
getSubinterfaces() |
Get the subinterfaces of this interface.
|
Set<ClassInfo> |
getSuperclasses() |
Get all direct and indirect superclasses of this class (i.e.
|
Set<ClassInfo> |
getSuperinterfaces() |
Get the superinterfaces of this interface.
|
ClassTypeSignature |
getTypeSignature() |
Get the type signature for the class, if available (else returns null).
|
String |
getTypeSignatureStr() |
Get the low-level Java type signature for the class, including generic type parameters, if available (else
returns null).
|
boolean |
hasAnnotation(String annotationName) |
Test whether this class, interface or annotation has the named class annotation or meta-annotation.
|
boolean |
hasDirectAnnotation(String directAnnotationName) |
Test whether this class has the named direct annotation or meta-annotation.
|
boolean |
hasDirectMetaAnnotation(String directMetaAnnotationName) |
Test whether this annotation is directly meta-annotated with the named annotation.
|
boolean |
hasDirectSubclass(String directSubclassName) |
Test whether this class has the named direct subclass.
|
boolean |
hasDirectSubinterface(String directSubinterfaceName) |
Test whether this class is and interface and has the named direct subinterface.
|
boolean |
hasDirectSuperclass(String directSuperclassName) |
Test whether this class directly extends the named superclass.
|
boolean |
hasDirectSuperinterface(String directSuperinterfaceName) |
Test whether this class is an interface and has the named direct superinterface.
|
boolean |
hasFieldWithAnnotation(String annotationName) |
Test whether this class has a field with the named field annotation.
|
int |
hashCode() |
Use hash code of class name.
|
boolean |
hasMetaAnnotation(String metaAnnotationName) |
Test whether this is an annotation class and it has the named meta-annotation.
|
boolean |
hasMethodWithAnnotation(String annotationName) |
Test whether this class has a method with the named method annotation or meta-annotation.
|
boolean |
hasMethodWithDirectAnnotation(String annotationName) |
Test whether this class has a method with the named method direct annotation.
|
boolean |
hasSubclass(String subclassName) |
Test whether this class has the named class as a subclass.
|
boolean |
hasSubinterface(String subinterfaceName) |
Test whether this class is has the named subinterface.
|
boolean |
hasSuperclass(String superclassName) |
Test whether this class extends the named superclass, directly or indirectly.
|
boolean |
hasSuperinterface(String superinterfaceName) |
Test whether this class is an interface and has the named superinterface.
|
boolean |
implementsInterface(String interfaceName) |
Test whether this standard class implements the named interface, or by one of its superclasses.
|
boolean |
isAbstract() |
Test whether this ClassInfo corresponds to an abstract class.
|
boolean |
isAnnotation() |
Test whether this ClassInfo corresponds to an annotation.
|
boolean |
isAnonymousInnerClass() |
Returns true if this is an anonymous inner class.
|
boolean |
isDirectlyImplementedByClass(String className) |
Test whether this class is directly implemented by the named class, or by one of its superclasses.
|
boolean |
isEnum() |
Test whether this ClassInfo corresponds to an enum.
|
boolean |
isExternalClass() |
Returns true if this class is an external class, i.e.
|
boolean |
isFinal() |
Test whether this ClassInfo corresponds to a final class.
|
boolean |
isImplementedByClass(String className) |
Test whether this class is implemented by the named class, or by one of its superclasses.
|
boolean |
isImplementedInterface() |
Test whether this class is an "implemented interface" (meaning a standard, non-annotation interface, or an
annotation that has also been implemented as an interface by some class).
|
boolean |
isInnerClass() |
Returns true if this is an inner class (call isAnonymousInnerClass() to test if this is an anonymous inner
class).
|
boolean |
isInterface() |
Test whether this ClassInfo corresponds to an interface.
|
boolean |
isOuterClass() |
Returns true if this class contains inner classes.
|
boolean |
isPublic() |
Test whether this ClassInfo corresponds to a public class.
|
boolean |
isStandardClass() |
Test whether this class is a standard class (not an annotation or interface).
|
boolean |
isSynthetic() |
Test whether this ClassInfo corresponds to a synthetic class.
|
boolean |
metaAnnotatesAnnotation(String annotationName) |
Test whether this annotation has the named meta-annotation.
|
String |
toString() |
public String getClassName()
public Class<?> getClassRef()
IllegalArgumentException
- if there were problems loading or initializing the class. (Note that class initialization on load
is disabled by default, you can enable it with
FastClasspathScanner#initializeLoadedClasses(true)
.)public <T> Class<T> getClassRef(Class<T> classType)
classType
- The class to cast the result to.IllegalArgumentException
- if there were problems loading the class, initializing the class, or casting it to the requested
type. (Note that class initialization on load is disabled by default, you can enable it with
FastClasspathScanner#initializeLoadedClasses(true)
.)public boolean isExternalClass()
public int getClassModifiers()
public String getModifiersStr()
public boolean isPublic()
public boolean isAbstract()
public boolean isSynthetic()
public boolean isFinal()
public boolean isAnnotation()
public boolean isInterface()
public boolean isEnum()
public String getTypeSignatureStr()
public ClassTypeSignature getTypeSignature()
@Deprecated public Set<URL> getClasspathElementURLs()
public URL getClasspathElementURL()
public File getClasspathElementFile()
public ModuleRef getClasspathElementModuleRef()
@Deprecated public ClassLoader[] getClassLoaders()
This is deprecated, because a different ClassLoader may need to be created dynamically if classloading fails
for the class (specifically to handle the case of needing to load classes from a Spring-Boot jar or similar,
when running outside that jar's own classloader -- see bug #209). If you need the classloader that loaded the
class, call getClassRef()
and then get the classloader from that class ref.
public int compareTo(ClassInfo o)
compareTo
in interface Comparable<ClassInfo>
public boolean equals(Object obj)
public static List<String> getClassNames(Collection<ClassInfo> classInfoColl)
ClassInfo
objects. (Class names are
not deduplicated.)classInfoColl
- The collection of ClassInfo
objects.public Set<String> getClassNamesReferencedInAnyTypeDescriptor()
public Set<String> getClassNamesReferencedInMethodTypeDescriptors()
public Set<String> getClassNamesReferencedInFieldTypeDescriptors()
public Set<String> getClassNamesReferencedInClassTypeDescriptor()
public boolean isStandardClass()
public Set<ClassInfo> getSubclasses()
public List<String> getNamesOfSubclasses()
public boolean hasSubclass(String subclassName)
subclassName
- The name of the subclass.public Set<ClassInfo> getDirectSubclasses()
public List<String> getNamesOfDirectSubclasses()
public boolean hasDirectSubclass(String directSubclassName)
directSubclassName
- The name of the direct subclass.public Set<ClassInfo> getSuperclasses()
(Includes the union of all mixin superclass hierarchies in the case of Scala mixins.)
public List<String> getNamesOfSuperclasses()
(Includes the union of all mixin superclass hierarchies in the case of Scala mixins.)
public boolean hasSuperclass(String superclassName)
superclassName
- The name of the superclass.public boolean isInnerClass()
public Set<ClassInfo> getOuterClasses()
public List<String> getOuterClassName()
public boolean isOuterClass()
public Set<ClassInfo> getInnerClasses()
public List<String> getInnerClassNames()
public boolean isAnonymousInnerClass()
public String getFullyQualifiedContainingMethodName()
public Set<ClassInfo> getDirectSuperclasses()
Typically the returned set will contain zero or one direct superclass(es), but may contain more than one direct superclass in the case of Scala mixins.
public ClassInfo getDirectSuperclass()
IllegalArgumentException
- if there are multiple direct superclasses of this class (in the case of Scala mixins).public List<String> getNamesOfDirectSuperclasses()
Typically the returned list will contain zero or one direct superclass name(s), but may contain more than one direct superclass name in the case of Scala mixins.
public String getNameOfDirectSuperclass()
IllegalArgumentException
- if there are multiple direct superclasses of this class (in the case of Scala mixins).public boolean hasDirectSuperclass(String directSuperclassName)
If this class has multiple direct superclasses (in the case of Scala mixins), returns true if the named superclass is one of the direct superclasses of this class.
directSuperclassName
- The direct superclass name to match. If null, matches classes without a direct superclass (e.g.
interfaces). Note that standard classes that do not extend another class have java.lang.Object as
their superclass.public boolean isImplementedInterface()
Annotations are interfaces, but you can also implement an annotation, so to we Test whether an interface (even an annotation) is implemented by a class or extended by a subinterface, or (failing that) if it is not an interface but not an annotation.
(This is named "implemented interface" rather than just "interface" to distinguish it from an annotation.)
public Set<ClassInfo> getSubinterfaces()
public List<String> getNamesOfSubinterfaces()
public boolean hasSubinterface(String subinterfaceName)
subinterfaceName
- The name of the subinterface.public Set<ClassInfo> getDirectSubinterfaces()
public List<String> getNamesOfDirectSubinterfaces()
public boolean hasDirectSubinterface(String directSubinterfaceName)
directSubinterfaceName
- The name of the direct subinterface.public Set<ClassInfo> getSuperinterfaces()
public List<String> getNamesOfSuperinterfaces()
public boolean hasSuperinterface(String superinterfaceName)
superinterfaceName
- The name of the superinterface.public Set<ClassInfo> getDirectSuperinterfaces()
public List<String> getNamesOfDirectSuperinterfaces()
public boolean hasDirectSuperinterface(String directSuperinterfaceName)
directSuperinterfaceName
- The name of the direct superinterface.public Set<ClassInfo> getImplementedInterfaces()
public List<String> getNamesOfImplementedInterfaces()
public boolean implementsInterface(String interfaceName)
interfaceName
- The name of the interface.public Set<ClassInfo> getDirectlyImplementedInterfaces()
public List<String> getNamesOfDirectlyImplementedInterfaces()
public boolean directlyImplementsInterface(String interfaceName)
interfaceName
- The name of the interface.public Set<ClassInfo> getClassesImplementing()
public List<String> getNamesOfClassesImplementing()
public boolean isImplementedByClass(String className)
className
- The name of the class.public Set<ClassInfo> getClassesDirectlyImplementing()
public List<String> getNamesOfClassesDirectlyImplementing()
public boolean isDirectlyImplementedByClass(String className)
className
- The name of the class.public Set<ClassInfo> getClassesWithAnnotation()
public List<String> getNamesOfClassesWithAnnotation()
public boolean annotatesClass(String annotatedClassName)
annotatedClassName
- The name of the annotated class.public Set<ClassInfo> getClassesWithDirectAnnotation()
public List<String> getNamesOfClassesWithDirectAnnotation()
public boolean directlyAnnotatesClass(String directlyAnnotatedClassName)
directlyAnnotatedClassName
- The name of the directly annotated class.public Set<ClassInfo> getAnnotations()
public List<String> getNamesOfAnnotations()
public boolean hasAnnotation(String annotationName)
annotationName
- The name of the annotation.public List<AnnotationInfo> getAnnotationInfo()
AnnotationInfo
objects, or the empty list if none.AnnotationInfo
objects for the annotations on this method, or the empty list if
none.public List<AnnotationInfo.AnnotationParamValue> getAnnotationDefaultParamValues()
AnnotationInfo.AnnotationParamValue
objects for each of the
default parameter values for this annotation, otherwise the empty list.public Set<ClassInfo> getDirectAnnotations()
public List<String> getNamesOfDirectAnnotations()
public boolean hasDirectAnnotation(String directAnnotationName)
directAnnotationName
- The name of the direct annotation.public Set<ClassInfo> getMetaAnnotations()
public List<String> getNamesOfMetaAnnotations()
public boolean hasMetaAnnotation(String metaAnnotationName)
metaAnnotationName
- The meta-annotation name.public Set<ClassInfo> getAnnotationsWithMetaAnnotation()
public List<String> getNamesOfAnnotationsWithMetaAnnotation()
public boolean metaAnnotatesAnnotation(String annotationName)
annotationName
- The annotation name.public Set<ClassInfo> getAnnotationsWithDirectMetaAnnotation()
public List<String> getNamesOfAnnotationsWithDirectMetaAnnotation()
public boolean hasDirectMetaAnnotation(String directMetaAnnotationName)
directMetaAnnotationName
- The direct meta-annotation name.public List<MethodInfo> getMethodInfo()
Requires that FastClasspathScanner#enableMethodInfo() be called before scanning, otherwise throws IllegalArgumentException.
By default only returns information for public methods, unless FastClasspathScanner#ignoreMethodVisibility()
was called before the scan. If method visibility is ignored, the result may include a reference to a private
static class initializer block, with a method name of "<clinit>"
.
IllegalArgumentException
- if FastClasspathScanner#enableMethodInfo() was not called prior to initiating the scan.public List<MethodInfo> getConstructorInfo()
"<init>"
. There may be more than one constructor of a given name with different type signatures, due
to overloading.
Requires that FastClasspathScanner#enableMethodInfo() be called before scanning, otherwise throws IllegalArgumentException.
By default only returns information for public constructors, unless FastClasspathScanner#ignoreMethodVisibility() was called before the scan.
IllegalArgumentException
- if FastClasspathScanner#enableMethodInfo() was not called prior to initiating the scan.public List<MethodInfo> getMethodAndConstructorInfo()
"<init>"
.
Requires that FastClasspathScanner#enableMethodInfo() be called before scanning, otherwise throws IllegalArgumentException.
By default only returns information for public methods and constructors, unless
FastClasspathScanner#ignoreMethodVisibility() was called before the scan. If method visibility is ignored,
the result may include a reference to a private static class initializer block, with a method name of
"<clinit>"
.
IllegalArgumentException
- if FastClasspathScanner#enableMethodInfo() was not called prior to initiating the scan.public List<MethodInfo> getMethodInfo(String methodName)
"<init>"
.
Requires that FastClasspathScanner#enableMethodInfo() be called before scanning, otherwise throws IllegalArgumentException.
By default only returns information for public methods, unless FastClasspathScanner#ignoreMethodVisibility() was called before the scan.
May return info for multiple methods with the same name (with different type signatures).
methodName
- The method name to query.IllegalArgumentException
- if FastClasspathScanner#enableMethodInfo() was not called prior to initiating the scan.public Set<ClassInfo> getMethodDirectAnnotations()
public Set<ClassInfo> getMethodAnnotations()
public List<String> getNamesOfMethodDirectAnnotations()
public List<String> getNamesOfMethodAnnotations()
public boolean hasMethodWithDirectAnnotation(String annotationName)
annotationName
- The annotation name.public boolean hasMethodWithAnnotation(String annotationName)
annotationName
- The annotation name.public Set<ClassInfo> getClassesWithDirectMethodAnnotation()
public Set<ClassInfo> getClassesWithMethodAnnotation()
public List<String> getNamesOfClassesWithDirectMethodAnnotation()
public List<String> getNamesOfClassesWithMethodAnnotation()
public boolean annotatesMethodOfClass(String className)
className
- The class name.public List<FieldInfo> getFieldInfo()
Requires that FastClasspathScanner#enableFieldInfo() be called before scanning, otherwise throws IllegalArgumentException.
By default only returns information for public methods, unless FastClasspathScanner#ignoreFieldVisibility() was called before the scan.
IllegalArgumentException
- if FastClasspathScanner#enableFieldInfo() was not called prior to initiating the scan.public FieldInfo getFieldInfo(String fieldName)
Requires that FastClasspathScanner#enableFieldInfo() be called before scanning, otherwise throws IllegalArgumentException.
By default only returns information for public fields, unless FastClasspathScanner#ignoreFieldVisibility() was called before the scan.
fieldName
- The field name to query.IllegalArgumentException
- if FastClasspathScanner#enableFieldInfo() was not called prior to initiating the scan.public Set<ClassInfo> getFieldAnnotations()
public List<String> getNamesOfFieldAnnotations()
public boolean hasFieldWithAnnotation(String annotationName)
annotationName
- The annotation name.public Set<ClassInfo> getClassesWithFieldAnnotation()
public List<String> getNamesOfClassesWithFieldAnnotation()
public Set<ClassInfo> getClassesWithDirectFieldAnnotation()
public List<String> getNamesOfClassesWithDirectFieldAnnotation()
public boolean annotatesFieldOfClass(String className)
className
- The class name.Copyright © 2018. All rights reserved.