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