|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kohsuke.stapler.CachingScriptLoader<S,E>
public abstract class CachingScriptLoader<S,E extends java.lang.Exception>
Convenient base class for caching loaded scripts.
Constructor Summary | |
---|---|
CachingScriptLoader()
|
Method Summary | |
---|---|
void |
clearScripts()
Discards the cached script. |
protected java.net.URL |
findResource(java.lang.String name,
java.lang.ClassLoader cl)
Wraps the getResource(String, ClassLoader) and make it support debug loader. |
S |
findScript(java.lang.String name)
Locates the view script of the given name. |
protected abstract java.net.URL |
getResource(java.lang.String name,
java.lang.ClassLoader cl)
|
protected abstract S |
loadScript(java.lang.String name)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CachingScriptLoader()
Method Detail |
---|
public S findScript(java.lang.String name) throws E extends java.lang.Exception
name
- if this is a relative path, such as "foo.jelly" or "foo/bar.groovy",
then it is assumed to be relative to this class, so
"org/acme/MyClass/foo.jelly" or "org/acme/MyClass/foo/bar.groovy"
will be searched.
If this starts with "/", then it is assumed to be absolute, and that name is searched from the classloader. This is useful to do mix-in.
E extends java.lang.Exception
protected abstract S loadScript(java.lang.String name) throws E extends java.lang.Exception
E extends java.lang.Exception
public void clearScripts()
protected final java.net.URL findResource(java.lang.String name, java.lang.ClassLoader cl)
getResource(String, ClassLoader)
and make it support debug loader.
protected abstract java.net.URL getResource(java.lang.String name, java.lang.ClassLoader cl)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |