public class JkCommandSet
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
JkCommandSet()
Constructs a
JkCommandSet . |
Modifier and Type | Method and Description |
---|---|
void |
clean()
Cleans the output directory.
|
java.nio.file.Path |
getBaseDir()
Returns the base directory for this project.
|
JkPathTree |
getBaseTree()
Returns the base directory tree for this project.
|
JkDependencySet |
getDefDependencies()
Dependencies necessary to compile the this command class.
|
JkDependencyResolver |
getDefDependencyResolver()
Returns the dependency resolver used to compile/run scripts of this project.
|
JkImportedCommandSets |
getImportedCommandSets()
Returns imported runs with plugins applied on.
|
java.nio.file.Path |
getOutputDir()
Returns the output directory where all the final and intermediate artifacts are generated.
|
<T extends JkPlugin> |
getPlugin(java.lang.Class<T> pluginClass)
Shorthand to
getPlugins().get( . |
JkCommandSetPlugins |
getPlugins()
Returns the container of loaded plugins for this instance.
|
void |
help()
Displays all available methods defined in this run.
|
static <T extends JkCommandSet> |
of(java.lang.Class<T> commandClass)
Creates a instance of the specified command class (extending JkCommandSet), including option injection, plugin loading
and plugin activation.
|
protected void |
setup()
This method is invoked right after options has been injected into this instance.
|
protected void |
setupAfterPluginActivations()
This method is called once all plugin has been activated.
|
java.lang.String |
toString() |
protected JkCommandSet()
JkCommandSet
. Using constructor alone won't give you an instance populated with runtime options
neither decorated with plugins. of(Class)
to get instances populated with options and decorated with plugins.public static <T extends JkCommandSet> T of(java.lang.Class<T> commandClass)
protected void setup() throws java.lang.Exception
java.lang.Exception
protected void setupAfterPluginActivations() throws java.lang.Exception
java.lang.Exception
public final JkPathTree getBaseTree()
JkPathTree.of(baseDir)
.public final java.nio.file.Path getBaseDir()
public java.nio.file.Path getOutputDir()
public JkCommandSetPlugins getPlugins()
public <T extends JkPlugin> T getPlugin(java.lang.Class<T> pluginClass)
getPlugins().get()
.
Returns the plugin instance of the specified class loaded in the holding JkCommandSet instance. If it does not hold
a plugin of the specified class at call time, the plugin is loaded then returned.public final JkDependencyResolver getDefDependencyResolver()
public final JkDependencySet getDefDependencies()
public final JkImportedCommandSets getImportedCommandSets()
public void clean()
public void help()
public java.lang.String toString()
toString
in class java.lang.Object