public class DefaultTopCodeCache extends Object implements TopCodeCache
SourceFactory
interface.
No automatic eviction of cached code.
Modifier and Type | Class and Description |
---|---|
static class |
DefaultTopCodeCache.Builder
Builder for instances of
DefaultTopCodeCache . |
Modifier | Constructor and Description |
---|---|
protected |
DefaultTopCodeCache(DefaultTopCodeCache.Builder builder)
constructor from builder.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
clears the cache.
|
DefaultTopCodeCache |
clone()
creates a clone with the same cached bytecode.
|
DefaultTopCodeCache.Builder |
getBuilder()
gets the builder.
|
CompilerFactory |
getCompilerFactory()
gets the compiler factory.
|
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.
|
protected DefaultTopCodeCache(DefaultTopCodeCache.Builder builder)
builder
- builderpublic SingleSourceCode getUpToDateCode(Source source)
TopCodeCache
getUpToDateCode
in interface TopCodeCache
source
- sourcepublic void setParent(ClassLoader parent)
TopCodeCache
setParent
in interface TopCodeCache
parent
- parent class loaderpublic ClassLoader getParent()
TopCodeCache
getParent
in interface TopCodeCache
public void clear()
TopCodeCache
clear
in interface TopCodeCache
public DefaultTopCodeCache clone()
TopCodeCache
clone
in interface TopCodeCache
clone
in class Object
public DefaultTopCodeCache.Builder getBuilder()
public CompilerFactory getCompilerFactory()