public abstract class JkPlugin
extends java.lang.Object
JkCommandSet
instance. The relationship is bidirectional :
JkCommandSet
instances can invoke plugin methods and vice-versa.
Therefore plugins can interact with (or load) other plugins from the owning JkCommandSet
instance
(which is a quite common pattern).
Modifier | Constructor and Description |
---|---|
protected |
JkPlugin(JkCommandSet commandSet) |
Modifier and Type | Method and Description |
---|---|
protected void |
activate()
Override this method to modify the commands itself or its bound plugins.
|
protected java.lang.String |
getBreakingVersionRegistryUrl()
When publishing a plugin, authors can not guess which future version of Jeka will break compatibility.
|
protected JkCommandSet |
getCommandSet() |
protected java.lang.String |
getLowestJekaCompatibleVersion()
Returns a the lowest Jeka version which is compatible with this plugin.
|
void |
help() |
protected void |
init()
This method is invoked right after plugin options has been injected
|
java.lang.String |
name() |
java.lang.String |
toString() |
protected JkPlugin(JkCommandSet commandSet)
public void help()
protected void activate()
protected java.lang.String getLowestJekaCompatibleVersion()
null
and
running Jeka version is lower then a warning log will be emitted.protected java.lang.String getBreakingVersionRegistryUrl()
The register is expected to be a simple flat file.
Each row is structured as pluginVersion : jekaVersion
.
The example below means that :
1.2.1.RELEASE : 0.9.1.RELEASE
1.3.0.RELEASE : 0.9.5.M1
protected void init()
public final java.lang.String name()
protected JkCommandSet getCommandSet()
public java.lang.String toString()
toString
in class java.lang.Object