Class AbstractGenerator
java.lang.Object
org.jdrupes.builder.core.AbstractProvider
org.jdrupes.builder.core.AbstractGenerator
- All Implemented Interfaces:
Generator, ResourceProvider
- Direct Known Subclasses:
ClasspathScanner, EclipseConfigurator, JarGenerator, JavaTool, MvnPublisher, PomFileGenerator, ResourceCollector, VscodeConfigurator
A base implementation of a
Generator.-
Field Summary
Fields inherited from class AbstractProvider
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancleanup(ResourceRequest<?> requested, Path... files) If the request includesCleanlinessdeletes the given files and returnstrue.name()Name.Sets the name of the generator.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
doProvide, provideMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ResourceProvider
provide
-
Constructor Details
-
AbstractGenerator
Instantiates a new abstract generator.- Parameters:
project- the project
-
-
Method Details
-
name
Sets the name of the generator.- Parameters:
name- the name- Returns:
- the generator
-
name
-
project
-
newResource
Short forproject().newResource(type, args).- 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
-