Package nz.org.riskscape.engine.plugin
Class BuiltInPluginDescriptor
java.lang.Object
nz.org.riskscape.engine.plugin.BuiltInPluginDescriptor
- All Implemented Interfaces:
nz.org.riskscape.engine.plugin.PluginDescriptor
public class BuiltInPluginDescriptor
extends Object
implements nz.org.riskscape.engine.plugin.PluginDescriptor
A plugin descriptor for code that wasn't dynamically loaded (and can also be used in some testing scenarios)
-
Constructor Summary
ConstructorsConstructorDescriptionBuiltInPluginDescriptor(String pluginId, nz.org.riskscape.engine.BuildInfo buildInfo, Class<? extends nz.org.riskscape.engine.plugin.Plugin> pluginClass, Path sourcePath) Creates a newBuiltInPluginDescriptorinstance. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDependency(nz.org.riskscape.engine.plugin.PluginDescriptor dependencyDescriptor) protected booleanbooleanThe location where this plugin and its resources can be accessed.inthashCode()booleannz.org.riskscape.engine.plugin.Pluginstatic <T extends nz.org.riskscape.engine.plugin.Plugin>
TtestPlugin(Class<T> pluginClass) Build a plugin for use in tests, setting the source path to be the process working directory.static <T extends nz.org.riskscape.engine.plugin.Plugin>
TtestPlugin(Class<T> pluginClass, Path sourcePath) Build a plugin for use in testsstatic <T extends nz.org.riskscape.engine.plugin.Plugin>
TtestPlugin(String pluginId, Class<T> pluginClass, Path sourcePath) Build a plugin for use in teststoString()
-
Constructor Details
-
BuiltInPluginDescriptor
public BuiltInPluginDescriptor(String pluginId, nz.org.riskscape.engine.BuildInfo buildInfo, Class<? extends nz.org.riskscape.engine.plugin.Plugin> pluginClass, Path sourcePath) Creates a new
BuiltInPluginDescriptorinstance.- Parameters:
pluginId-buildInfo-pluginClass-sourcePath- The location where this plugin and its resources can be accessed. Currently only used by the cpython plugin to find the python code it needs.
-
-
Method Details
-
testPlugin
Build a plugin for use in tests, setting the source path to be the process working directory.
-
testPlugin
public static <T extends nz.org.riskscape.engine.plugin.Plugin> T testPlugin(String pluginId, Class<T> pluginClass, Path sourcePath) Build a plugin for use in tests
-
testPlugin
public static <T extends nz.org.riskscape.engine.plugin.Plugin> T testPlugin(Class<T> pluginClass, Path sourcePath) Build a plugin for use in tests
-
getI18nClassLoader
- Specified by:
getI18nClassLoaderin interfacenz.org.riskscape.engine.plugin.PluginDescriptor
-
newPluginInstance
public nz.org.riskscape.engine.plugin.Plugin newPluginInstance()- Specified by:
newPluginInstancein interfacenz.org.riskscape.engine.plugin.PluginDescriptor
-
hasPluginDependencies
public boolean hasPluginDependencies()- Specified by:
hasPluginDependenciesin interfacenz.org.riskscape.engine.plugin.PluginDescriptor
-
getPluginDependencies
- Specified by:
getPluginDependenciesin interfacenz.org.riskscape.engine.plugin.PluginDescriptor
-
addDependency
public void addDependency(nz.org.riskscape.engine.plugin.PluginDescriptor dependencyDescriptor) - Specified by:
addDependencyin interfacenz.org.riskscape.engine.plugin.PluginDescriptor
-
getPluginClassName
- Specified by:
getPluginClassNamein interfacenz.org.riskscape.engine.plugin.PluginDescriptor
-
getVersion
- Specified by:
getVersionin interfacenz.org.riskscape.engine.plugin.PluginDescriptor
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode() -
getPluginId
- Specified by:
getPluginIdin interfacenz.org.riskscape.engine.plugin.PluginDescriptor
-
getSourcePath
The location where this plugin and its resources can be accessed. Currently only used by the cpython plugin to find the python code it needs.
- Specified by:
getSourcePathin interfacenz.org.riskscape.engine.plugin.PluginDescriptor
-