Class AbstractGenerator
java.lang.Object
org.jdrupes.builder.core.AbstractProvider
org.jdrupes.builder.core.AbstractGenerator
- All Implemented Interfaces:
Generator, Renamable, ResourceProvider
- Direct Known Subclasses:
AbstractBndGenerator, ClasspathScanner, EclipseConfigurator, JarBuilder, JavaTool, JUnitTestRunner, MvnPublisher, PomFileGenerator, ResourceCollector, VscodeConfigurator
A base implementation of a
Generator.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancleanup(ResourceRequest<?> requested, Path... files) If the request includesCleanlinessdeletes the given files and returnstrue.Set the new name.protected <T extends Resource>
TnewResource(ResourceType<T> type, Object... args) Short forproject().newResource(type, args).final Projectproject()Project.toString()To string.Methods inherited from class AbstractProvider
context, doProvide, name, of, rename, vavrStream
-
Constructor Details
-
AbstractGenerator
Instantiates a new abstract generator.- Parameters:
project- the project
-
-
Method Details
-
project
-
name
-
newResource
Short forproject().newResource(type, args).- Overrides:
newResourcein classAbstractProvider- Type Parameters:
T- the generic type- Parameters:
type- the typeargs- the args- Returns:
- the t
-
cleanup
If the request includesCleanlinessdeletes the given files and returnstrue.- Parameters:
requested- the requested resourcefiles- the files- Returns:
- true, if successful
-
toString
To string.- Overrides:
toStringin classAbstractProvider- Returns:
- the string
-