public class ScanResult extends Object
Modifier and Type | Method and Description |
---|---|
long |
classpathContentsLastModifiedTime()
Find the maximum last-modified timestamp of any whitelisted file/directory/jarfile encountered during the
scan.
|
boolean |
classpathContentsModifiedSinceScan()
Determine whether the classpath contents have been modified since the last scan.
|
String |
generateClassGraphDotFile(float sizeX,
float sizeY)
Generate a .dot file which can be fed into GraphViz for layout and visualization of the class graph.
|
Map<String,ClassInfo> |
getClassNameToClassInfo()
Get a map from class name to ClassInfo object for all whitelisted classes found during the scan.
|
List<Throwable> |
getMatchProcessorExceptions()
Return the exceptions and errors thrown during classloading and/or while calling MatchProcessors on loaded
classes.
|
List<String> |
getNamesOfAllAnnotationClasses()
Get the names of all annotation classes found during the scan.
|
List<String> |
getNamesOfAllClasses()
Get the names of all classes, interfaces and annotations found during the scan.
|
List<String> |
getNamesOfAllInterfaceClasses()
Get the names of all interface classes found during the scan.
|
List<String> |
getNamesOfAllStandardClasses()
Get the names of all standard (non-interface/non-annotation) classes found during the scan.
|
List<String> |
getNamesOfAnnotationsOnClass(Class<?> klass)
Get the names of all annotations and meta-annotations on the given class.
|
List<String> |
getNamesOfAnnotationsOnClass(String className)
Get the names of all annotations and meta-annotations on the named class.
|
List<String> |
getNamesOfAnnotationsWithMetaAnnotation(Class<?> metaAnnotation)
Return the names of all annotations that have the named meta-annotation.
|
List<String> |
getNamesOfAnnotationsWithMetaAnnotation(String metaAnnotationName)
Return the names of all annotations that have the named meta-annotation.
|
List<String> |
getNamesOfClassesImplementing(Class<?> implementedInterface)
Get the names of all classes that implement (or have superclasses that implement) the given interface (or one
of its subinterfaces).
|
List<String> |
getNamesOfClassesImplementing(String interfaceName)
Get the names of all classes that implement (or have superclasses that implement) the named interface (or one
of its subinterfaces).
|
List<String> |
getNamesOfClassesImplementingAllOf(Class<?>... implementedInterfaces)
Get the names of all classes that implement (or have superclasses that implement) all of the given interfaces
(or their subinterfaces).
|
List<String> |
getNamesOfClassesImplementingAllOf(String... implementedInterfaceNames)
Get the names of all classes that implement (or have superclasses that implement) all of the named interfaces
(or their subinterfaces).
|
List<String> |
getNamesOfClassesWithAnnotation(Class<?> annotation)
Get the names of non-annotation classes with the given class annotation or meta-annotation.
|
List<String> |
getNamesOfClassesWithAnnotation(String annotationName)
Get the names of non-annotation classes with the named class annotation or meta-annotation.
|
List<String> |
getNamesOfClassesWithAnnotationsAllOf(Class<?>... annotations)
Get the names of classes that have all of the given annotations.
|
List<String> |
getNamesOfClassesWithAnnotationsAllOf(String... annotationNames)
Get the names of classes that have all of the named annotations.
|
List<String> |
getNamesOfClassesWithAnnotationsAnyOf(Class<?>... annotations)
Get the names of classes that have any of the given annotations.
|
List<String> |
getNamesOfClassesWithAnnotationsAnyOf(String... annotationNames)
Get the names of classes that have any of the named annotations.
|
List<String> |
getNamesOfClassesWithFieldOfType(Class<?> fieldType)
Get the names of classes that have a field of the given type, or that have the given type as a type
parameter.
|
List<String> |
getNamesOfClassesWithFieldOfType(String fieldTypeName)
Get the names of classes that have a field of the named type, or that have the given type as a type
parameter.
|
List<String> |
getNamesOfClassesWithMethodAnnotation(Class<?> annotation)
Get the names of classes that have a method with an annotation of the given type.
|
List<String> |
getNamesOfClassesWithMethodAnnotation(String annotationName)
Get the names of classes that have a method with an annotation of the named type.
|
List<String> |
getNamesOfSubclassesOf(Class<?> superclass)
Get the names of classes on the classpath that extend the specified superclass.
|
List<String> |
getNamesOfSubclassesOf(String superclassName)
Get the names of all subclasses of the named class.
|
List<String> |
getNamesOfSubinterfacesOf(Class<?> superInterface)
Get the names of interfaces on the classpath that extend a given superinterface.
|
List<String> |
getNamesOfSubinterfacesOf(String interfaceName)
Get the names of all subinterfaces of the named interface.
|
List<String> |
getNamesOfSuperclassesOf(Class<?> subclass)
Get the names of classes on the classpath that are superclasses of the specified subclass.
|
List<String> |
getNamesOfSuperclassesOf(String subclassName)
Get the names of classes on the classpath that are superclasses of the named subclass.
|
List<String> |
getNamesOfSuperinterfacesOf(Class<?> subInterface)
Get the names of all superinterfaces of the given subinterface.
|
List<String> |
getNamesOfSuperinterfacesOf(String subInterfaceName)
Get the names of all superinterfaces of the named interface.
|
List<File> |
getUniqueClasspathElements()
Returns the list of File objects for unique classpath elements (directories or jarfiles), in classloader
resolution order.
|
public List<Throwable> getMatchProcessorExceptions()
public List<File> getUniqueClasspathElements()
public boolean classpathContentsModifiedSinceScan()
public long classpathContentsLastModifiedTime()
public Map<String,ClassInfo> getClassNameToClassInfo()
public List<String> getNamesOfAllClasses()
public List<String> getNamesOfAllStandardClasses()
public List<String> getNamesOfSubclassesOf(String superclassName)
superclassName
- The name of the superclass.public List<String> getNamesOfSubclassesOf(Class<?> superclass)
superclass
- The superclass to match (i.e. the class that subclasses need to extend to match).public List<String> getNamesOfSuperclassesOf(String subclassName)
subclassName
- The name of the subclass.public List<String> getNamesOfSuperclassesOf(Class<?> subclass)
subclass
- The subclass to match (i.e. the class that needs to extend a superclass for the superclass to
match).public List<String> getNamesOfClassesWithFieldOfType(String fieldTypeName)
fieldTypeName
- the name of the field type.public List<String> getNamesOfClassesWithFieldOfType(Class<?> fieldType)
fieldType
- the field type.public List<String> getNamesOfClassesWithMethodAnnotation(String annotationName)
annotationName
- the name of the method annotation.public List<String> getNamesOfClassesWithMethodAnnotation(Class<?> annotation)
annotation
- the method annotation.public List<String> getNamesOfAllInterfaceClasses()
public List<String> getNamesOfSubinterfacesOf(String interfaceName)
interfaceName
- The interface name.public List<String> getNamesOfSubinterfacesOf(Class<?> superInterface)
superInterface
- The superinterface.public List<String> getNamesOfSuperinterfacesOf(String subInterfaceName)
subInterfaceName
- The subinterface name.public List<String> getNamesOfSuperinterfacesOf(Class<?> subInterface)
subInterface
- The subinterface.public List<String> getNamesOfClassesImplementing(String interfaceName)
interfaceName
- The interface name.public List<String> getNamesOfClassesImplementing(Class<?> implementedInterface)
implementedInterface
- The interface.public List<String> getNamesOfClassesImplementingAllOf(String... implementedInterfaceNames)
implementedInterfaceNames
- The names of the interfaces.public List<String> getNamesOfClassesImplementingAllOf(Class<?>... implementedInterfaces)
implementedInterfaces
- The interfaces.public List<String> getNamesOfAllAnnotationClasses()
public List<String> getNamesOfClassesWithAnnotation(String annotationName)
annotationName
- The name of the class annotation or meta-annotation.public List<String> getNamesOfClassesWithAnnotation(Class<?> annotation)
annotation
- The class annotation or meta-annotation to match.public List<String> getNamesOfClassesWithAnnotationsAllOf(String... annotationNames)
annotationNames
- The class annotation names.public List<String> getNamesOfClassesWithAnnotationsAllOf(Class<?>... annotations)
annotations
- The class annotations.public List<String> getNamesOfClassesWithAnnotationsAnyOf(String... annotationNames)
annotationNames
- The annotation names.public List<String> getNamesOfClassesWithAnnotationsAnyOf(Class<?>... annotations)
annotations
- The annotations.public List<String> getNamesOfAnnotationsOnClass(String className)
className
- The class name.public List<String> getNamesOfAnnotationsOnClass(Class<?> klass)
klass
- The class.public List<String> getNamesOfAnnotationsWithMetaAnnotation(String metaAnnotationName)
metaAnnotationName
- The name of the meta-annotation.public List<String> getNamesOfAnnotationsWithMetaAnnotation(Class<?> metaAnnotation)
metaAnnotation
- The meta-annotation.public String generateClassGraphDotFile(float sizeX, float sizeY)
sizeX
- The GraphViz layout width in inches.sizeY
- The GraphViz layout width in inches.Copyright © 2016. All rights reserved.