Class ClasspathScanner
java.lang.Object
org.jdrupes.builder.core.AbstractProvider
org.jdrupes.builder.core.AbstractGenerator
org.jdrupes.builder.java.ClasspathScanner
- All Implemented Interfaces:
Generator, Renamable, ResourceProvider
Provides
FileTrees with classes from a given classpath.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected <T extends Resource>
Collection<T> doProvide(ResourceRequest<T> requested) ProvideFileTrees with classes from a given classpath if the requested resource is of type ClasspathElement.Sets the path.Methods inherited from class AbstractGenerator
cleanup, name, project, toStringMethods inherited from class AbstractProvider
context, name, of, rename, vavrStreamMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ResourceProvider
context, name, of, resources
-
Constructor Details
-
ClasspathScanner
Instantiates a new classpath provider. The path needs to be set withpath.- Parameters:
project- the project
-
-
Method Details
-
path
Sets the path. Thepathis a list of directories or jar files separated by the system's path separator. Relative paths are resolved against the project's directory.- Parameters:
path- the path- Returns:
- the classpath scanner
-
doProvide
ProvideFileTrees with classes from a given classpath if the requested resource is of type ClasspathElement.- Specified by:
doProvidein classAbstractProvider- Type Parameters:
T- the requested type- Parameters:
requested- the requested resources- Returns:
- the stream
-