Package jminusminus
Class ByteClassLoader
java.lang.Object
java.lang.ClassLoader
jminusminus.ByteClassLoader
A class loader to be able to load a class from a byte stream.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionClass<?>
Loads the class with the specified fully qualified name.void
setClassBytes
(byte[] bytes) Sets the bytes representing the class.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
-
ByteClassLoader
ByteClassLoader()
-
-
Method Details
-
setClassBytes
public void setClassBytes(byte[] bytes) Sets the bytes representing the class.- Parameters:
bytes
- bytes representing the class.
-
loadClass
Loads the class with the specified fully qualified name.- Overrides:
loadClass
in classClassLoader
- Parameters:
name
- the fully qualified name of the class.resolve
- if true then resolve the class.- Throws:
ClassNotFoundException
- if the class could not be found.
-