Package jadex.bytecode
Class ByteCodeClassLoader
java.lang.Object
java.lang.ClassLoader
jadex.bytecode.ByteCodeClassLoader
- All Implemented Interfaces:
IByteCodeClassLoader
ClassLoader for generated classes.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ClassLoader[]
Additional delegates besides the parent. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addDelegates
(ClassLoader[] parents) Access to the classloader type.Class
<?> doDefineClass
(byte[] classcode) Defines a new class.Class
<?> doDefineClass
(String name, byte[] b, int off, int len) Exposes the defineClass() method.Class
<?> doDefineClass
(String name, byte[] b, int off, int len, ProtectionDomain protectiondomain) Exposes the defineClass() method.Class
<?> doDefineClassInParent
(String name, byte[] b, int off, int len, ProtectionDomain protectiondomain) Exposes the defineClass() method for explicit indirect definition.protected Class
<?> Delegation.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, 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 jadex.bytecode.IByteCodeClassLoader
loadClass
-
Field Details
-
delegates
Additional delegates besides the parent.
-
-
Constructor Details
-
ByteCodeClassLoader
Creates the loader.- Parameters:
parent
- Parent loaders.
-
-
Method Details
-
findClass
Delegation.- Overrides:
findClass
in classClassLoader
- Throws:
ClassNotFoundException
-
asClassLoader
Access to the classloader type.- Specified by:
asClassLoader
in interfaceIByteCodeClassLoader
- Returns:
- ClassLoader.
-
doDefineClass
Defines a new class.- Specified by:
doDefineClass
in interfaceIByteCodeClassLoader
- Parameters:
classcode
- Code of the class.- Returns:
- The generated class.
-
doDefineClass
Exposes the defineClass() method.- Specified by:
doDefineClass
in interfaceIByteCodeClassLoader
-
doDefineClass
public Class<?> doDefineClass(String name, byte[] b, int off, int len, ProtectionDomain protectiondomain) Exposes the defineClass() method.- Specified by:
doDefineClass
in interfaceIByteCodeClassLoader
-
doDefineClassInParent
public Class<?> doDefineClassInParent(String name, byte[] b, int off, int len, ProtectionDomain protectiondomain) Exposes the defineClass() method for explicit indirect definition.- Specified by:
doDefineClassInParent
in interfaceIByteCodeClassLoader
-
addDelegates
-