Package ch.grengine.load
Class DefaultTopCodeCache
java.lang.Object
ch.grengine.load.DefaultTopCodeCache
- All Implemented Interfaces:
TopCodeCache
Default implementation of the
SourceFactory interface.
No automatic eviction of cached code.
- Since:
- 1.0
- Author:
- Alain Stalder, Made in Switzerland.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedconstructor from builder. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()clears the cache.clone()creates a clone with the same cached bytecode.gets the builder.gets the compiler factory.gets the parent class loader.getUpToDateCode(Source source) gets the code from the cache, recompiling the given source if it had been modified.voidsetParent(ClassLoader parent) sets the parent class loader and clears the cache.
-
Constructor Details
-
DefaultTopCodeCache
constructor from builder.- Parameters:
builder- builder- Since:
- 1.0
-
-
Method Details
-
getUpToDateCode
Description copied from interface:TopCodeCachegets the code from the cache, recompiling the given source if it had been modified.- Specified by:
getUpToDateCodein interfaceTopCodeCache- Parameters:
source- source- Returns:
- code
-
setParent
Description copied from interface:TopCodeCachesets the parent class loader and clears the cache.- Specified by:
setParentin interfaceTopCodeCache- Parameters:
parent- parent class loader
-
getParent
Description copied from interface:TopCodeCachegets the parent class loader.- Specified by:
getParentin interfaceTopCodeCache- Returns:
- parent class loader
-
clear
public void clear()Description copied from interface:TopCodeCacheclears the cache.- Specified by:
clearin interfaceTopCodeCache
-
clone
Description copied from interface:TopCodeCachecreates a clone with the same cached bytecode.- Specified by:
clonein interfaceTopCodeCache- Overrides:
clonein classObject- Returns:
- clone
-
getBuilder
gets the builder.- Returns:
- builder
- Since:
- 1.0
-
getCompilerFactory
gets the compiler factory.- Returns:
- compiler factory
- Since:
- 1.0
-