public class Transformation extends Object
| Constructor and Description |
|---|
Transformation()
Creates a new transformation without configuring a project.
|
Transformation(Project project)
Creates a new transformation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
argument(Action<PluginArgument> action)
Adds a plugin argument to consider during instantiation.
|
void |
argument(groovy.lang.Closure<?> closure)
Adds a plugin argument to consider during instantiation.
|
List<PluginArgument> |
getArguments()
Returns a list of arguments that are provided to the plugin for construction.
|
Class<? extends Plugin> |
getPlugin()
Returns the plugin type to apply.
|
String |
getPluginName()
Returns the fully-qualified name of the plugin type to apply.
|
protected List<Plugin.Factory.UsingReflection.ArgumentResolver> |
makeArgumentResolvers()
Creates the argument resolvers for the plugin's constructor by transforming the plugin arguments.
|
void |
setPlugin(Class<? extends Plugin> plugin)
Sets the plugin type to apply.
|
void |
setPluginName(String pluginName)
Sets the fully-qualified name of the plugin type to apply.
|
protected Class<? extends Plugin> |
toPlugin(ClassLoader classLoader)
Resolves the plugin type.
|
protected String |
toPluginName()
Resolves the name of the plugin.
|
public Transformation()
@Inject public Transformation(Project project)
project - The object factory to use.@Input public List<PluginArgument> getArguments()
public void argument(groovy.lang.Closure<?> closure)
closure - The closure for configuring the argument.public void argument(Action<PluginArgument> action)
action - The action for configuring the argument.protected List<Plugin.Factory.UsingReflection.ArgumentResolver> makeArgumentResolvers()
@Input @MaybeNull @Optional public Class<? extends Plugin> getPlugin()
public void setPlugin(@MaybeNull Class<? extends Plugin> plugin)
plugin - The plugin type to apply.@Input @MaybeNull @Optional public String getPluginName()
public void setPluginName(@MaybeNull String pluginName)
pluginName - The fully-qualified name of the plugin type to apply.protected Class<? extends Plugin> toPlugin(@MaybeNull ClassLoader classLoader)
classLoader - The class loader to load a plugin from, if appropriate.protected String toPluginName()