Package gw.internal.gosu.compiler
Class SingleServingGosuClassLoader
java.lang.Object
java.lang.ClassLoader
gw.internal.gosu.compiler.SingleServingGosuClassLoader
- All Implemented Interfaces:
IGosuClassLoader
- Direct Known Subclasses:
DiscreteClassLoader
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescription(package private) Class
_defineClass
(ICompilableType gsClass) void
assignParent
(ClassLoader classLoader) static void
static void
clearCache
(String gosuClassName) private byte[]
compileClass
(ICompilableType type, boolean debug) defineClass
(String name, byte[] bytes) void
void
evictLoader
(String packageName) Class<?>
byte[]
getBytes
(ICompilableType gsClass) static Class
getCached
(ICompilableType gsClass) getFunctionClassForArity
(boolean hasReturn, int length) boolean
protected Class<?>
private boolean
shouldCache
(ICompilableType gsClass) protected void
boolean
waitForLoaderToUnload
(String packageName, long millisToWait) Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResource, findResources, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface gw.lang.reflect.gs.IGosuClassLoader
loadClass
-
Field Details
-
CACHE
-
_parent
-
_classes
-
-
Constructor Details
-
SingleServingGosuClassLoader
SingleServingGosuClassLoader() -
SingleServingGosuClassLoader
SingleServingGosuClassLoader(GosuClassLoader parent)
-
-
Method Details
-
getCached
-
clearCache
public static void clearCache() -
clearCache
-
findClass
- Specified by:
findClass
in interfaceIGosuClassLoader
- Overrides:
findClass
in classClassLoader
- Throws:
ClassNotFoundException
-
unload
-
loadClass
- Overrides:
loadClass
in classClassLoader
- Throws:
ClassNotFoundException
-
dumpAllClasses
public void dumpAllClasses()- Specified by:
dumpAllClasses
in interfaceIGosuClassLoader
-
waitForLoaderToUnload
- Specified by:
waitForLoaderToUnload
in interfaceIGosuClassLoader
-
evictLoader
- Specified by:
evictLoader
in interfaceIGosuClassLoader
-
_defineClass
-
shouldCache
-
compileClass
-
getFunctionClassForArity
- Specified by:
getFunctionClassForArity
in interfaceIGosuClassLoader
-
getActualLoader
- Specified by:
getActualLoader
in interfaceIGosuClassLoader
-
defineClass
- Specified by:
defineClass
in interfaceIGosuClassLoader
-
getBytes
- Specified by:
getBytes
in interfaceIGosuClassLoader
-
assignParent
- Specified by:
assignParent
in interfaceIGosuClassLoader
-
isDisposed
public boolean isDisposed()
-