|
||||||||||
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(FS fs,
ClassLoader loader)
Create a new plugin context. |
Method Summary | ||
---|---|---|
ClassLoader |
getLoader()
|
|
|
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(FS fs, ClassLoader loader) throws NullPointerException
fs
- the file systemloader
- the loader
NullPointerException
- if any parameter argument is nullMethod 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 nullpublic 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 nullpublic 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 typepublic 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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |