|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crsh.plugin.PluginContext
public class PluginContext
The plugin context.
| Constructor Summary | |
|---|---|
PluginContext(PluginDiscovery discovery,
FS fs,
ClassLoader loader)
Create a new plugin context. |
|
| Method Summary | ||
|---|---|---|
ClassLoader |
getLoader()
|
|
|
getPlugins(Class<T> pluginType)
|
|
|
getProperty(PropertyDescriptor<T> desc)
Returns a context property or null if it cannot be found. |
|
String |
getVersion()
|
|
List<String> |
listResourceId(ResourceKind kind)
|
|
Resource |
loadResource(String resourceId,
ResourceKind resourceKind)
|
|
void |
refresh()
Refresh the fs system view. |
|
|
setProperty(PropertyDescriptor<T> desc,
String value)
Set a context property to a new value. |
|
|
setProperty(PropertyDescriptor<T> desc,
T value)
Set a context property to a new value. |
|
void |
start()
|
|
void |
stop()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PluginContext(PluginDiscovery discovery,
FS fs,
ClassLoader loader)
throws NullPointerException
discovery - the plugin discoveryfs - the file systemloader - the loader
NullPointerException - if any parameter argument is null| Method Detail |
|---|
public final String getVersion()
public final <T> T getProperty(PropertyDescriptor<T> desc)
throws NullPointerException
T - the property parameter typedesc - the property descriptor
NullPointerException - if the descriptor argument is null
public final <T> void setProperty(PropertyDescriptor<T> desc,
T value)
throws NullPointerException
T - the property parameter typedesc - the property descriptorvalue - the property value
NullPointerException - if the descriptor argument is null
public final <T> void setProperty(PropertyDescriptor<T> desc,
String value)
throws NullPointerException,
IllegalArgumentException
T - the property parameter typedesc - the property descriptorvalue - the property value
NullPointerException - if the descriptor argument is null
IllegalArgumentException - if the string value cannot be converted to the property type
public final Resource loadResource(String resourceId,
ResourceKind resourceKind)
public final List<String> listResourceId(ResourceKind kind)
public final ClassLoader getLoader()
public final void refresh()
public final void start()
public final void stop()
public <T> Iterable<T> getPlugins(Class<T> pluginType)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||