public class ByteCodeLoader extends SecureClassLoader
| Constructor and Description |
|---|
ByteCodeLoader(String className,
byte[] byteCode)
Creates a new
ByteCodeLoader ready to load a class with the
given name and the given byte code. |
| Modifier and Type | Method and Description |
|---|---|
protected Class<?> |
findClass(String name) |
static Class<?> |
load(String className,
byte[] byteCode)
Utility method for creating a new
ByteCodeLoader and then
directly load the given byte code. |
static Class<?> |
load(String className,
CharSequence sourceCode)
Utility method for creating a new
ByteCodeLoader and then
directly load the given byte code. |
defineClass, defineClass, getPermissionsclearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSignerspublic ByteCodeLoader(String className, byte[] byteCode)
ByteCodeLoader ready to load a class with the
given name and the given byte code.className - The name of the classbyteCode - The byte code of the classprotected Class<?> findClass(String name) throws ClassNotFoundException
findClass in class ClassLoaderClassNotFoundExceptionpublic static Class<?> load(String className, byte[] byteCode)
ByteCodeLoader and then
directly load the given byte code.className - The name of the classbyteCode - The byte code for the classClass object representing the classpublic static Class<?> load(String className, CharSequence sourceCode)
ByteCodeLoader and then
directly load the given byte code.className - The name of the classsourceCode - The source code for the class with name classNameClass object representing the classCopyright © 2024. All rights reserved.