public class FastClasspathScanner extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
FastClasspathScanner.ClassMatcher
An interface used for testing if a class matches specified criteria.
|
Modifier and Type | Field and Description |
---|---|
static boolean |
verbose
If set to true, print info while scanning
|
Constructor and Description |
---|
FastClasspathScanner(String... scanSpec)
Constructs a FastClasspathScanner instance.
|
Modifier and Type | Method and Description |
---|---|
long |
classpathContentsLastModifiedTime()
Returns the maximum "last modified" timestamp in the classpath (in epoch millis), or zero if scan() has not
yet been called (or if nothing was found on the classpath).
|
boolean |
classpathContentsModifiedSinceScan()
Returns true if the classpath contents have been changed since scan() was last called.
|
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()
Returns the sorted names of all annotation classes found in a whitelisted (and non-blacklisted) package
during the scan.
|
List<String> |
getNamesOfAllClasses()
Returns the sorted names of all standard classes, interface classes and annotation classes found in a
whitelisted (and non-blacklisted) package during the scan.
|
List<String> |
getNamesOfAllInterfaceClasses()
Returns the sorted names of all interface classes (interfaces) found in a whitelisted (and non-blacklisted)
package during the scan.
|
List<String> |
getNamesOfAllStandardClasses()
Returns the sorted names of all standard classes found in a whitelisted (and non-blacklisted) package 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 names of all annotations and meta-annotations on the specified class or interface.
|
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 are annotated with the specified 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 implementedInterfaceName)
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> |
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)
Returns the names of classes on the classpath that have the specified 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)
Returns the names of classes that have a field of the given type.
|
List<String> |
getNamesOfMetaAnnotationsOnAnnotation(Class<?> annotation)
Return the names of all meta-annotations on the specified annotation.
|
List<String> |
getNamesOfMetaAnnotationsOnAnnotation(String annotationName)
Return the names of all meta-annotations on the specified annotation.
|
List<String> |
getNamesOfSubclassesOf(Class<?> superclass)
Returns the names of classes on the classpath that extend the specified superclass.
|
List<String> |
getNamesOfSubclassesOf(String superclassName)
Returns the names of classes on the classpath that extend the specified superclass.
|
List<String> |
getNamesOfSubinterfacesOf(Class<?> superInterface)
Returns the names of interfaces on the classpath that extend a given superinterface.
|
List<String> |
getNamesOfSubinterfacesOf(String superInterfaceName)
Returns the names of interfaces on the classpath that extend a given superinterface.
|
List<String> |
getNamesOfSuperclassesOf(Class<?> subclass)
Returns the names of classes on the classpath that are superclasses of the specified subclass.
|
List<String> |
getNamesOfSuperclassesOf(String subclassName)
Returns the names of classes on the classpath that are superclasses of the specified subclass.
|
List<String> |
getNamesOfSuperinterfacesOf(Class<?> subInterface)
Returns the names of interfaces on the classpath that are superinterfaces of a given subinterface.
|
List<String> |
getNamesOfSuperinterfacesOf(String subinterfaceName)
Returns the names of interfaces on the classpath that are superinterfaces of a given subinterface.
|
ClassGraphTracer |
getScanResults()
Returns the ClassGraphBuilder created by calling .scan(), or throws RuntimeException if .scan() has not yet
been called.
|
List<File> |
getUniqueClasspathElements()
Returns the list of all unique File objects representing directories or zip/jarfiles on the classpath, in
classloader resolution order.
|
FastClasspathScanner |
matchAllAnnotationClasses(ClassMatchProcessor ClassMatchProcessor)
Calls the provided ClassMatchProcessor for all annotation classes (annotation definitions) found in
whitelisted packages on the classpath.
|
FastClasspathScanner |
matchAllClasses(ClassMatchProcessor classMatchProcessor)
Calls the provided ClassMatchProcessor for all standard classes, interfaces and annotations found in
whitelisted packages on the classpath.
|
FastClasspathScanner |
matchAllInterfaceClasses(ClassMatchProcessor ClassMatchProcessor)
Calls the provided ClassMatchProcessor for all interface classes (interface definitions) found in whitelisted
packages on the classpath.
|
FastClasspathScanner |
matchAllStandardClasses(ClassMatchProcessor classMatchProcessor)
Calls the provided ClassMatchProcessor for all standard classes (i.e.
|
<T> FastClasspathScanner |
matchClassesImplementing(Class<T> implementedInterface,
InterfaceMatchProcessor<T> interfaceMatchProcessor)
Calls the provided InterfaceMatchProcessor for classes on the classpath that implement the specified
interface or a subinterface, or whose superclasses implement the specified interface or a sub-interface.
|
FastClasspathScanner |
matchClassesWithAnnotation(Class<?> annotation,
ClassAnnotationMatchProcessor classAnnotationMatchProcessor)
Calls the provided ClassMatchProcessor if classes are found on the classpath that have the specified
annotation.
|
<T> FastClasspathScanner |
matchClassesWithFieldOfType(Class<T> fieldType,
ClassMatchProcessor classMatchProcessor)
Calls the provided ClassMatchProcessor for classes on the classpath that have a field of the given type.
|
FastClasspathScanner |
matchFilenameExtension(String extensionToMatch,
FileMatchContentsProcessor fileMatchContentsProcessor)
Calls the given FileMatchProcessor if files are found on the classpath that have the given file extension.
|
FastClasspathScanner |
matchFilenameExtension(String extensionToMatch,
FileMatchContentsProcessorWithContext fileMatchContentsProcessorWithContext)
Calls the given FileMatchProcessorWithContext if files are found on the classpath that have the given file
extension.
|
FastClasspathScanner |
matchFilenameExtension(String extensionToMatch,
FileMatchProcessor fileMatchProcessor)
Calls the given FileMatchProcessor if files are found on the classpath that have the given file extension.
|
FastClasspathScanner |
matchFilenameExtension(String extensionToMatch,
FileMatchProcessorWithContext fileMatchProcessorWithContext)
Calls the given FileMatchProcessorWithContext if files are found on the classpath that have the given file
extension.
|
FastClasspathScanner |
matchFilenamePath(String relativePathToMatch,
FileMatchContentsProcessor fileMatchContentsProcessor)
Calls the given FileMatchContentsProcessor if files are found on the classpath that exactly match the given
relative path.
|
FastClasspathScanner |
matchFilenamePath(String relativePathToMatch,
FileMatchContentsProcessorWithContext fileMatchContentsProcessorWithContext)
Calls the given FileMatchContentsProcessorWithContext if files are found on the classpath that exactly match
the given relative path.
|
FastClasspathScanner |
matchFilenamePath(String relativePathToMatch,
FileMatchProcessor fileMatchProcessor)
Calls the given FileMatchProcessor if files are found on the classpath that exactly match the given relative
path.
|
FastClasspathScanner |
matchFilenamePath(String relativePathToMatch,
FileMatchProcessorWithContext fileMatchProcessorWithContext)
Calls the given FileMatchProcessorWithContext if files are found on the classpath that exactly match the
given relative path.
|
FastClasspathScanner |
matchFilenamePathLeaf(String pathLeafToMatch,
FileMatchContentsProcessor fileMatchContentsProcessor)
Calls the given FileMatchContentsProcessor if files are found on the classpath that exactly match the given
path leafname.
|
FastClasspathScanner |
matchFilenamePathLeaf(String pathLeafToMatch,
FileMatchContentsProcessorWithContext fileMatchContentsProcessorWithContext)
Calls the given FileMatchContentsProcessorWithContext if files are found on the classpath that exactly match
the given path leafname.
|
FastClasspathScanner |
matchFilenamePathLeaf(String pathLeafToMatch,
FileMatchProcessor fileMatchProcessor)
Calls the given FileMatchProcessor if files are found on the classpath that exactly match the given path
leafname.
|
FastClasspathScanner |
matchFilenamePathLeaf(String pathLeafToMatch,
FileMatchProcessorWithContext fileMatchProcessorWithContext)
Calls the given FileMatchProcessorWithContext if files are found on the classpath that exactly match the
given path leafname.
|
FastClasspathScanner |
matchFilenamePattern(String pathRegexp,
FileMatchContentsProcessor fileMatchContentsProcessor)
Calls the given FileMatchContentsProcessor if files are found on the classpath with the given regexp pattern
in their path.
|
FastClasspathScanner |
matchFilenamePattern(String pathRegexp,
FileMatchContentsProcessorWithContext fileMatchContentsProcessorWithContext)
Calls the given FileMatchContentsProcessorWithContext if files are found on the classpath with the given
regexp pattern in their path.
|
FastClasspathScanner |
matchFilenamePattern(String pathRegexp,
FileMatchProcessor fileMatchProcessor)
Calls the given FileMatchProcessor if files are found on the classpath with the given regexp pattern in their
path.
|
FastClasspathScanner |
matchFilenamePattern(String pathRegexp,
FileMatchProcessorWithContext fileMatchProcessorWithContext)
Calls the given FileMatchProcessorWithContext if files are found on the classpath with the given regexp
pattern in their path.
|
FastClasspathScanner |
matchStaticFinalFieldNames(Set<String> fullyQualifiedStaticFinalFieldNames,
StaticFinalFieldMatchProcessor staticFinalFieldMatchProcessor)
Calls the given StaticFinalFieldMatchProcessor if classes are found on the classpath that contain static
final fields that match one of a set of fully-qualified field names, e.g.
|
FastClasspathScanner |
matchStaticFinalFieldNames(String[] fullyQualifiedStaticFinalFieldNames,
StaticFinalFieldMatchProcessor staticFinalFieldMatchProcessor)
Calls the given StaticFinalFieldMatchProcessor if classes are found on the classpath that contain static
final fields that match one of a list of fully-qualified field names, e.g.
|
FastClasspathScanner |
matchStaticFinalFieldNames(String fullyQualifiedStaticFinalFieldName,
StaticFinalFieldMatchProcessor staticFinalFieldMatchProcessor)
Calls the given StaticFinalFieldMatchProcessor if classes are found on the classpath that contain static
final fields that match a fully-qualified field name, e.g.
|
<T> FastClasspathScanner |
matchSubclassesOf(Class<T> superclass,
SubclassMatchProcessor<T> subclassMatchProcessor)
Calls the provided SubclassMatchProcessor if classes are found on the classpath that extend the specified
superclass.
|
<T> FastClasspathScanner |
matchSubinterfacesOf(Class<T> superinterface,
SubinterfaceMatchProcessor<T> subinterfaceMatchProcessor)
Calls the provided SubinterfaceMatchProcessor if an interface that extends a given superinterface is found on
the classpath.
|
FastClasspathScanner |
overrideClasspath(String classpath)
Override the automatically-detected classpath with a custom search path.
|
void |
registerClassLoaderHandler(ClassLoaderHandler extraClassLoaderHandler)
Add an extra ClassLoaderHandler.
|
FastClasspathScanner |
scan()
Scans the classpath for matching files, and calls any match processors if a match is identified.
|
FastClasspathScanner |
verbose()
Switch on verbose mode (prints debug info to System.out).
|
public FastClasspathScanner(String... scanSpec)
scanSpec
- The constructor accepts a list of whitelisted package prefixes / jar names to scan, as well as
blacklisted packages/jars not to scan, where blacklisted entries are prefixed with the '-'
character. See https://github.com/lukehutch/fast-classpath-scanner#constructor for info.public void registerClassLoaderHandler(ClassLoaderHandler extraClassLoaderHandler)
public FastClasspathScanner overrideClasspath(String classpath)
public List<String> getNamesOfAllClasses()
public List<String> getNamesOfAllStandardClasses()
public List<String> getNamesOfAllInterfaceClasses()
public List<String> getNamesOfAllAnnotationClasses()
public FastClasspathScanner matchAllClasses(ClassMatchProcessor classMatchProcessor)
classMatchProcessor
- the ClassMatchProcessor to call when a match is found.public FastClasspathScanner matchAllStandardClasses(ClassMatchProcessor classMatchProcessor)
classMatchProcessor
- the ClassMatchProcessor to call when a match is found.public FastClasspathScanner matchAllInterfaceClasses(ClassMatchProcessor ClassMatchProcessor)
ClassMatchProcessor
- the ClassMatchProcessor to call when a match is found.public FastClasspathScanner matchAllAnnotationClasses(ClassMatchProcessor ClassMatchProcessor)
ClassMatchProcessor
- the ClassMatchProcessor to call when a match is found.public <T> FastClasspathScanner matchSubclassesOf(Class<T> superclass, SubclassMatchProcessor<T> subclassMatchProcessor)
superclass
- The superclass to match (i.e. the class that subclasses need to extend to match).subclassMatchProcessor
- the SubclassMatchProcessor to call when a match is found.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> getNamesOfSubclassesOf(String superclassName)
superclassName
- The name of the superclass to match (i.e. the name of the class that subclasses need to extend).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> getNamesOfSuperclassesOf(String subclassName)
subclassName
- The subclass to match (i.e. the class that needs to extend a superclass for the superclass to
match).public <T> FastClasspathScanner matchSubinterfacesOf(Class<T> superinterface, SubinterfaceMatchProcessor<T> subinterfaceMatchProcessor)
superinterface
- The superinterface to match (i.e. the interface that subinterfaces need to extend to match).subinterfaceMatchProcessor
- the SubinterfaceMatchProcessor to call when a match is found.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> getNamesOfSubinterfacesOf(String superInterfaceName)
superInterfaceName
- The name of the superinterface to match (i.e. the name of the interface that subinterfaces need to
extend).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> getNamesOfSuperinterfacesOf(String subinterfaceName)
subinterfaceName
- The name of the superinterface to match (i.e. the name of the interface that subinterfaces need to
extend).public <T> FastClasspathScanner matchClassesImplementing(Class<T> implementedInterface, InterfaceMatchProcessor<T> interfaceMatchProcessor)
implementedInterface
- The interface that classes need to implement.interfaceMatchProcessor
- the ClassMatchProcessor to call when a match is found.public List<String> getNamesOfClassesImplementing(Class<?> implementedInterface)
implementedInterface
- The interface that classes need to implement to match.public List<String> getNamesOfClassesImplementing(String implementedInterfaceName)
implementedInterfaceName
- The name of the interface 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> getNamesOfClassesImplementingAllOf(String... implementedInterfaceNames)
implementedInterfaceNames
- The name of the interfaces that classes need to implement.public <T> FastClasspathScanner matchClassesWithFieldOfType(Class<T> fieldType, ClassMatchProcessor classMatchProcessor)
fieldType
- The type of the field to match..classMatchProcessor
- the ClassMatchProcessor to call when a match is found.public List<String> getNamesOfClassesWithFieldOfType(String fieldTypeName)
public List<String> getNamesOfClassesWithFieldOfType(Class<?> fieldType)
public FastClasspathScanner matchClassesWithAnnotation(Class<?> annotation, ClassAnnotationMatchProcessor classAnnotationMatchProcessor)
annotation
- The class annotation to match.classAnnotationMatchProcessor
- the ClassAnnotationMatchProcessor to call when a match is found.public List<String> getNamesOfClassesWithAnnotation(Class<?> annotation)
annotation
- The class annotation.public List<String> getNamesOfClassesWithAnnotation(String annotationName)
annotationName
- The name of the class annotation.public List<String> getNamesOfClassesWithAnnotationsAllOf(Class<?>... annotations)
annotations
- The annotations.public List<String> getNamesOfClassesWithAnnotationsAllOf(String... annotationNames)
annotationNames
- The annotation names.public List<String> getNamesOfClassesWithAnnotationsAnyOf(Class<?>... annotations)
annotations
- The annotations.public List<String> getNamesOfClassesWithAnnotationsAnyOf(String... annotationNames)
annotationNames
- The annotation names.public List<String> getNamesOfAnnotationsWithMetaAnnotation(Class<?> metaAnnotation)
metaAnnotation
- The specified meta-annotation.public List<String> getNamesOfAnnotationsWithMetaAnnotation(String metaAnnotationName)
metaAnnotationName
- The name of the specified meta-annotation.public List<String> getNamesOfAnnotationsOnClass(Class<?> classOrInterface)
classOrInterface
- The class or interface.public List<String> getNamesOfAnnotationsOnClass(String classOrInterfaceName)
classOrInterfaceName
- The name of the class or interface.public List<String> getNamesOfMetaAnnotationsOnAnnotation(Class<?> annotation)
annotation
- The specified annotation.public List<String> getNamesOfMetaAnnotationsOnAnnotation(String annotationName)
annotationName
- The name of the specified annotation.public FastClasspathScanner matchStaticFinalFieldNames(Set<String> fullyQualifiedStaticFinalFieldNames, StaticFinalFieldMatchProcessor staticFinalFieldMatchProcessor)
fullyQualifiedStaticFinalFieldNames
- The set of fully-qualified static field names to match.staticFinalFieldMatchProcessor
- the StaticFinalFieldMatchProcessor to call when a match is found.public FastClasspathScanner matchStaticFinalFieldNames(String fullyQualifiedStaticFinalFieldName, StaticFinalFieldMatchProcessor staticFinalFieldMatchProcessor)
fullyQualifiedStaticFinalFieldName
- The fully-qualified static field name to matchstaticFinalFieldMatchProcessor
- the StaticFinalFieldMatchProcessor to call when a match is found.public FastClasspathScanner matchStaticFinalFieldNames(String[] fullyQualifiedStaticFinalFieldNames, StaticFinalFieldMatchProcessor staticFinalFieldMatchProcessor)
fullyQualifiedStaticFinalFieldNames
- The list of fully-qualified static field names to match.staticFinalFieldMatchProcessor
- the StaticFinalFieldMatchProcessor to call when a match is found.public FastClasspathScanner matchFilenamePattern(String pathRegexp, FileMatchProcessorWithContext fileMatchProcessorWithContext)
pathRegexp
- The regexp to match, e.g. "app/templates/.\*\.html"fileMatchProcessorWithContext
- The FileMatchProcessorWithContext to call when each match is found.public FastClasspathScanner matchFilenamePattern(String pathRegexp, FileMatchProcessor fileMatchProcessor)
pathRegexp
- The regexp to match, e.g. "app/templates/.\*\.html"fileMatchProcessor
- The FileMatchProcessor to call when each match is found.public FastClasspathScanner matchFilenamePattern(String pathRegexp, FileMatchContentsProcessorWithContext fileMatchContentsProcessorWithContext)
pathRegexp
- The regexp to match, e.g. "app/templates/.\*\.html"fileMatchContentsProcessorWithContext
- The FileMatchContentsProcessorWithContext to call when each match is found.public FastClasspathScanner matchFilenamePattern(String pathRegexp, FileMatchContentsProcessor fileMatchContentsProcessor)
pathRegexp
- The regexp to match, e.g. "app/templates/.\*\.html"fileMatchContentsProcessor
- The FileMatchContentsProcessor to call when each match is found.public FastClasspathScanner matchFilenamePath(String relativePathToMatch, FileMatchProcessorWithContext fileMatchProcessorWithContext)
relativePathToMatch
- The complete path to match relative to the classpath entry, e.g.
"app/templates/WidgetTemplate.html"fileMatchProcessorWithContext
- The FileMatchProcessorWithContext to call when each match is found.public FastClasspathScanner matchFilenamePath(String relativePathToMatch, FileMatchProcessor fileMatchProcessor)
relativePathToMatch
- The complete path to match relative to the classpath entry, e.g.
"app/templates/WidgetTemplate.html"fileMatchProcessor
- The FileMatchProcessor to call when each match is found.public FastClasspathScanner matchFilenamePath(String relativePathToMatch, FileMatchContentsProcessorWithContext fileMatchContentsProcessorWithContext)
relativePathToMatch
- The complete path to match relative to the classpath entry, e.g.
"app/templates/WidgetTemplate.html"fileMatchContentsProcessorWithContext
- The FileMatchContentsProcessorWithContext to call when each match is found.public FastClasspathScanner matchFilenamePath(String relativePathToMatch, FileMatchContentsProcessor fileMatchContentsProcessor)
relativePathToMatch
- The complete path to match relative to the classpath entry, e.g.
"app/templates/WidgetTemplate.html"fileMatchContentsProcessor
- The FileMatchContentsProcessor to call when each match is found.public FastClasspathScanner matchFilenamePathLeaf(String pathLeafToMatch, FileMatchProcessorWithContext fileMatchProcessorWithContext)
pathLeafToMatch
- The complete path leaf to match, e.g. "WidgetTemplate.html"fileMatchProcessorWithContext
- The FileMatchProcessorWithContext to call when each match is found.public FastClasspathScanner matchFilenamePathLeaf(String pathLeafToMatch, FileMatchProcessor fileMatchProcessor)
pathLeafToMatch
- The complete path leaf to match, e.g. "WidgetTemplate.html"fileMatchProcessor
- The FileMatchProcessor to call when each match is found.public FastClasspathScanner matchFilenamePathLeaf(String pathLeafToMatch, FileMatchContentsProcessorWithContext fileMatchContentsProcessorWithContext)
pathLeafToMatch
- The complete path leaf to match, e.g. "WidgetTemplate.html"fileMatchContentsProcessorWithContext
- The FileMatchContentsProcessorWithContext to call when each match is found.public FastClasspathScanner matchFilenamePathLeaf(String pathLeafToMatch, FileMatchContentsProcessor fileMatchContentsProcessor)
pathLeafToMatch
- The complete path leaf to match, e.g. "WidgetTemplate.html"fileMatchContentsProcessor
- The FileMatchContentsProcessor to call when each match is found.public FastClasspathScanner matchFilenameExtension(String extensionToMatch, FileMatchProcessorWithContext fileMatchProcessorWithContext)
extensionToMatch
- The extension to match, e.g. "html" matches "WidgetTemplate.html" and "WIDGET.HTML".fileMatchProcessorWithContext
- The FileMatchProcessorWithContext to call when each match is found.public FastClasspathScanner matchFilenameExtension(String extensionToMatch, FileMatchProcessor fileMatchProcessor)
extensionToMatch
- The extension to match, e.g. "html" matches "WidgetTemplate.html" and "WIDGET.HTML".fileMatchProcessor
- The FileMatchProcessor to call when each match is found.public FastClasspathScanner matchFilenameExtension(String extensionToMatch, FileMatchContentsProcessorWithContext fileMatchContentsProcessorWithContext)
extensionToMatch
- The extension to match, e.g. "html" matches "WidgetTemplate.html".fileMatchContentsProcessorWithContext
- The FileMatchContentsProcessorWithContext to call when each match is found.public FastClasspathScanner matchFilenameExtension(String extensionToMatch, FileMatchContentsProcessor fileMatchContentsProcessor)
extensionToMatch
- The extension to match, e.g. "html" matches "WidgetTemplate.html".fileMatchContentsProcessor
- The FileMatchContentsProcessor to call when each match is found.public List<File> getUniqueClasspathElements()
public String generateClassGraphDotFile(float sizeX, float sizeY)
public ClassGraphTracer getScanResults()
public FastClasspathScanner scan()
public boolean classpathContentsModifiedSinceScan()
public long classpathContentsLastModifiedTime()
public FastClasspathScanner verbose()
Copyright © 2016. All rights reserved.