Class FallbackClassDefiner.DefiningClassLoader
java.lang.Object
java.lang.ClassLoader
eu.cloudnetservice.driver.util.define.FallbackClassDefiner.DefiningClassLoader
- Enclosing class:
- FallbackClassDefiner
A class loader which gives access to the normally protected defineClass method.
- Since:
- 4.0
-
Constructor Summary
ConstructorsConstructorDescriptionDefiningClassLoader(@Nullable ClassLoader parent) Creates a new defining class loader for the parent class loader of the holding class. -
Method Summary
Modifier and TypeMethodDescriptiondefineClass(byte[] byteCode) An exposed method which allows converting the given bytecode into an instance of class delegating the call toClassLoader.defineClass(String, byte[], int, int).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, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
Constructor Details
-
DefiningClassLoader
Creates a new defining class loader for the parent class loader of the holding class.- Parameters:
parent- the parent class loader for delegation.
-
-
Method Details
-
defineClass
An exposed method which allows converting the given bytecode into an instance of class delegating the call toClassLoader.defineClass(String, byte[], int, int).- Parameters:
byteCode- the bytecode of the class to define.- Returns:
- the constructed class object from the given bytecode.
-