public interface TopCodeCache
Used to cache individual code layers on top of the LayeredEngine
.
This top code cache is typically what is used if running a script from
the Grengine
if the script is not part of static code layers or the
top load mode is "current first" and the source in the static code layers
has been modified since compilation. Each source gets its own independent
bytecode class loader that does not see any code of the other source
instances in the top code cache.
Modifier and Type | Method and Description |
---|---|
void |
clear()
clears the cache.
|
TopCodeCache |
clone()
creates a clone with the same cached bytecode.
|
ClassLoader |
getParent()
gets the parent class loader.
|
SingleSourceCode |
getUpToDateCode(Source source)
gets the code from the cache, recompiling the given source if it had been modified.
|
void |
setParent(ClassLoader parent)
sets the parent class loader and clears the cache.
|
SingleSourceCode getUpToDateCode(Source source)
source
- sourceCompileException
- if compilation failedNullPointerException
- if source is nullvoid setParent(ClassLoader parent)
parent
- parent class loaderNullPointerException
- if parent is nullClassLoader getParent()
void clear()
TopCodeCache clone()