T - The configuration setting type (e.g., a POJO).public abstract class ConfigurableSmithyBuildPlugin<T> extends java.lang.Object implements SmithyBuildPlugin
T.
This class will automatically deserialize the given Node
value in the T and invoke executeWithConfig(PluginContext, Object)
with the deserialized configuration of type T.
If your build plugin requires configuration, then you typically should just extend this class.
| Constructor and Description |
|---|
ConfigurableSmithyBuildPlugin() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(PluginContext context)
Executes the plugin, creating any number of artifacts.
|
protected abstract void |
executeWithConfig(PluginContext context,
T config)
Executes the plugin using the deserialized configuration object.
|
abstract java.lang.Class<T> |
getConfigType()
Gets the configuration class type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateServiceFactory, createServiceFactory, createServiceFactory, getName, isSerial, requiresValidModelpublic abstract java.lang.Class<T> getConfigType()
The referenced configType class must be a public POJO with a
public, zero-arg constructor, getters, and setters. If the POJO has a
public static fromNode method, it will be invoked and is
expected to deserialize the Node. If the POJO has a public static
builder method, it will be invoked, setters will be called
on the builder POJO, and finally the result of calling the
build method is used as the configuration type. Finally,
the deserializer will attempt to create the type and call setters on
it that correspond to property names.
public void execute(PluginContext context)
SmithyBuildPluginexecute in interface SmithyBuildPlugincontext - Plugin context for build execution.protected abstract void executeWithConfig(PluginContext context, T config)
context - Plugin context.config - Deserialized configuration object.