Package rife.continuations.basic
Class BasicContinuableClassLoader
java.lang.Object
java.lang.ClassLoader
rife.continuations.basic.BasicContinuableClassLoader
- All Implemented Interfaces:
ClassBytesProvider
Classloader implementation that will transform bytecode for classes that
should receive the continuations functionalities.
Note that this is a basic classloader implementation. For your own
application you should probably create your own or at least read over
the source code of this one. It's even better to not use a custom
classloader and only rely on the ContinuationsAgent
.
- Since:
- 1.0
-
Constructor Summary
ConstructorDescriptionBasicContinuableClassLoader
(ClassLoader parent, ContinuationConfigInstrument config) Creates a new classloader instance.Creates a new classloader instance with the context classloader as the parent classloader. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
getClassBytes
(String className, boolean reloadAutomatically) Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, 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
-
Constructor Details
-
BasicContinuableClassLoader
Creates a new classloader instance with the context classloader as the parent classloader.- Parameters:
config
- the instance of the instrumentation configuration that will be used for the transformation- Since:
- 1.0
-
BasicContinuableClassLoader
Creates a new classloader instance.- Parameters:
parent
- the parent classloaderconfig
- the instance of the instrumentation configuration that will be used for the transformation- Since:
- 1.0
-
-
Method Details
-
getClassBytes
public byte[] getClassBytes(String className, boolean reloadAutomatically) throws ClassNotFoundException - Specified by:
getClassBytes
in interfaceClassBytesProvider
- Throws:
ClassNotFoundException
-
loadClass
- Overrides:
loadClass
in classClassLoader
- Throws:
ClassNotFoundException
-