public abstract class ProjectPlugin extends Object implements Plugin<Project>
Base implementation of a Plugin which prevents double-application.
Constructor and Description |
---|
ProjectPlugin() |
Modifier and Type | Method and Description |
---|---|
void |
apply(Project project) |
protected abstract void |
applyOnce(Project project)
Plugin application, which is guaranteed to execute only once.
|
static <T extends Plugin<?>> |
getPlugin(Project project,
Class<T> pluginClazz)
Returns the instance of the given plugin, by returning the existing or applying brand new, as appropriate.
|
static com.diffplug.common.tree.TreeDef.Parented<Project> |
treeDef()
A TreeDef for projects.
|
protected abstract void applyOnce(Project project)
Plugin application, which is guaranteed to execute only once.
public static <T extends Plugin<?>> T getPlugin(Project project, Class<T> pluginClazz)
Returns the instance of the given plugin, by returning the existing or applying brand new, as appropriate.
public static com.diffplug.common.tree.TreeDef.Parented<Project> treeDef()
A TreeDef for projects.