public class ScanResult extends Object
Constructor and Description |
---|
ScanResult(ScanSpec scanSpec,
Map<String,ClassInfo> classNameToClassInfo,
Map<File,Long> fileToTimestamp,
ThreadLog log) |
Modifier and Type | Method and Description |
---|---|
long |
classpathContentsLastModifiedTime() |
boolean |
classpathContentsModifiedSinceScan()
Returns true if the classpath contents have been modified since the last scan.
|
String |
generateClassGraphDotFile(float sizeX,
float sizeY)
Generates a .dot file which can be fed into GraphViz for layout and visualization of the class graph.
|
List<String> |
getNamesOfAllAnnotationClasses()
Return the sorted unique names of all annotation classes found during the scan.
|
List<String> |
getNamesOfAllClasses()
Get the sorted unique names of all classes, interfaces and annotations found during the scan.
|
List<String> |
getNamesOfAllInterfaceClasses()
Return the sorted unique names of all interface classes found during the scan.
|
List<String> |
getNamesOfAllStandardClasses()
Get the sorted unique names of all standard (non-interface/annotation) classes found during the scan.
|
List<String> |
getNamesOfAnnotationsOnClass(Class<?> classOrInterface)
Return the names of all annotations and meta-annotations on the specified class or interface.
|
List<String> |
getNamesOfAnnotationsOnClass(String classOrInterfaceName)
Return the sorted list of names of all annotations and meta-annotations on the named class.
|
List<String> |
getNamesOfAnnotationsWithMetaAnnotation(Class<?> metaAnnotation)
Return the names of all annotations that are annotated with the specified meta-annotation.
|
List<String> |
getNamesOfAnnotationsWithMetaAnnotation(String metaAnnotationName)
Return the names of all annotations that have the named meta-annotation.
|
List<String> |
getNamesOfClassesImplementing(Class<?> implementedInterface)
Returns the names of classes on the classpath that implement the specified interface or a subinterface, or
whose superclasses implement the specified interface or a sub-interface.
|
List<String> |
getNamesOfClassesImplementing(String interfaceName)
Return the sorted list of names of all classes implementing the named interface.
|
List<String> |
getNamesOfClassesImplementingAllOf(Class<?>... implementedInterfaces)
Returns the names of classes on the classpath that implement (or have superclasses that implement) all of the
specified interfaces or their subinterfaces.
|
List<String> |
getNamesOfClassesImplementingAllOf(String... implementedInterfaceNames)
Returns the names of classes on the classpath that implement (or have superclasses that implement) all of the
specified interfaces or their subinterfaces.
|
List<String> |
getNamesOfClassesWithAnnotation(Class<?> annotation)
Returns the names of classes on the classpath that have the specified annotation.
|
List<String> |
getNamesOfClassesWithAnnotation(String annotationName)
Return the sorted list of names of all standard classes or non-annotation interfaces with the named class
annotation or meta-annotation.
|
List<String> |
getNamesOfClassesWithAnnotationsAllOf(Class<?>... annotations)
Returns the names of classes on the classpath that have all of the specified annotations.
|
List<String> |
getNamesOfClassesWithAnnotationsAllOf(String... annotationNames)
Returns the names of classes on the classpath that have all of the specified annotations.
|
List<String> |
getNamesOfClassesWithAnnotationsAnyOf(Class<?>... annotations)
Returns the names of classes on the classpath that have any of the specified annotations.
|
List<String> |
getNamesOfClassesWithAnnotationsAnyOf(String... annotationNames)
Returns the names of classes on the classpath that have any of the specified annotations.
|
List<String> |
getNamesOfClassesWithFieldOfType(Class<?> fieldType)
Returns the names of classes that have a field of the given type.
|
List<String> |
getNamesOfClassesWithFieldOfType(String fieldTypeName)
Return a sorted list of classes that have a field of the named type, where the field type is in a whitelisted
(non-blacklisted) package.
|
List<String> |
getNamesOfMetaAnnotationsOnAnnotation(Class<?> annotation)
Return the names of all meta-annotations on the specified annotation.
|
List<String> |
getNamesOfMetaAnnotationsOnAnnotation(String annotationName)
Return the sorted list of names of all meta-annotations on the named annotation.
|
List<String> |
getNamesOfSubclassesOf(Class<?> superclass)
Returns the names of classes on the classpath that extend the specified superclass.
|
List<String> |
getNamesOfSubclassesOf(String className)
Return the sorted list of names of all subclasses of the named class.
|
List<String> |
getNamesOfSubinterfacesOf(Class<?> superInterface)
Returns the names of interfaces on the classpath that extend a given superinterface.
|
List<String> |
getNamesOfSubinterfacesOf(String interfaceName)
Return the sorted list of names of all subinterfaces of the named interface.
|
List<String> |
getNamesOfSuperclassesOf(Class<?> subclass)
Returns the names of classes on the classpath that are superclasses of the specified subclass.
|
List<String> |
getNamesOfSuperclassesOf(String className)
Return the sorted list of names of all superclasses of the named class.
|
List<String> |
getNamesOfSuperinterfacesOf(Class<?> subInterface)
Returns the names of interfaces on the classpath that are superinterfaces of a given subinterface.
|
List<String> |
getNamesOfSuperinterfacesOf(String interfaceName)
Return the names of all superinterfaces of the named interface.
|
public boolean classpathContentsModifiedSinceScan()
public long classpathContentsLastModifiedTime()
public List<String> getNamesOfAllClasses()
public List<String> getNamesOfAllStandardClasses()
public List<String> getNamesOfSubclassesOf(String className)
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 className)
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)
public List<String> getNamesOfClassesWithFieldOfType(Class<?> fieldType)
public List<String> getNamesOfAllInterfaceClasses()
public List<String> getNamesOfSubinterfacesOf(String interfaceName)
public List<String> getNamesOfSubinterfacesOf(Class<?> superInterface)
superInterface
- The superinterface to match (i.e. the interface that subinterfaces need to extend to match).public List<String> getNamesOfSuperinterfacesOf(String interfaceName)
public List<String> getNamesOfSuperinterfacesOf(Class<?> subInterface)
subInterface
- The superinterface to match (i.e. the interface that subinterfaces need to extend to match).public List<String> getNamesOfClassesImplementing(String interfaceName)
public List<String> getNamesOfClassesImplementing(Class<?> implementedInterface)
implementedInterface
- The interface that classes need to implement to match.public List<String> getNamesOfClassesImplementingAllOf(String... implementedInterfaceNames)
implementedInterfaceNames
- The name of the interfaces that classes need to implement.public List<String> getNamesOfClassesImplementingAllOf(Class<?>... implementedInterfaces)
implementedInterfaces
- The name of the interfaces that classes need to implement.public List<String> getNamesOfAllAnnotationClasses()
public List<String> getNamesOfClassesWithAnnotation(String annotationName)
public List<String> getNamesOfClassesWithAnnotation(Class<?> annotation)
annotation
- The class annotation.public List<String> getNamesOfClassesWithAnnotationsAllOf(String... annotationNames)
annotationNames
- The annotation names.public List<String> getNamesOfClassesWithAnnotationsAllOf(Class<?>... annotations)
annotations
- The 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 classOrInterfaceName)
public List<String> getNamesOfAnnotationsOnClass(Class<?> classOrInterface)
classOrInterface
- The class or interface.public List<String> getNamesOfMetaAnnotationsOnAnnotation(String annotationName)
public List<String> getNamesOfMetaAnnotationsOnAnnotation(Class<?> annotation)
annotation
- The specified annotation.public List<String> getNamesOfAnnotationsWithMetaAnnotation(String metaAnnotationName)
public List<String> getNamesOfAnnotationsWithMetaAnnotation(Class<?> metaAnnotation)
metaAnnotation
- The specified meta-annotation.public String generateClassGraphDotFile(float sizeX, float sizeY)
Copyright © 2016. All rights reserved.