CLT - ClassLoader tear-off.public abstract class AbstractTearOff<CLT,S,E extends Exception> extends CachingScriptLoader<S,E>
| Modifier and Type | Field and Description |
|---|---|
protected CLT |
classLoader |
protected MetaClass |
owner |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractTearOff(MetaClass owner,
Class<CLT> cltClass) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract String |
getDefaultScriptExtension()
The file extension of this kind of scripts, such as ".jelly"
|
protected URL |
getResource(String name) |
protected WebApp |
getWebApp() |
protected boolean |
hasAllowedExtension(String name)
Checks if the file name is allowed as a script of this type.
|
protected S |
loadScript(String name)
Cache-less version of the
CachingScriptLoader.findScript(String) that provides the actual logic. |
protected abstract S |
parseScript(URL res)
Compiles a script into the compiled form.
|
S |
resolveScript(String name)
Loads the script just from the target class without considering inherited scripts
from its base types.
|
clearScripts, findScriptprotected final WebApp getWebApp()
protected abstract String getDefaultScriptExtension()
protected boolean hasAllowedExtension(String name)
public S resolveScript(String name) throws E extends Exception
protected final S loadScript(String name) throws E extends Exception
CachingScriptLoaderCachingScriptLoader.findScript(String) that provides the actual logic.loadScript in class CachingScriptLoader<S,E extends Exception>E extends Exceptionprotected abstract S parseScript(URL res) throws E extends Exception
protected URL getResource(String name)
getResource in class CachingScriptLoader<S,E extends Exception>Copyright © 2014. All rights reserved.