Package org.mozilla.javascript
Class DefiningClassLoader
- java.lang.Object
-
- java.lang.ClassLoader
-
- org.mozilla.javascript.DefiningClassLoader
-
- All Implemented Interfaces:
GeneratedClassLoader
public class DefiningClassLoader extends java.lang.ClassLoader implements GeneratedClassLoader
Load generated classes.
-
-
Constructor Summary
Constructors Constructor Description DefiningClassLoader()
DefiningClassLoader(java.lang.ClassLoader parentLoader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<?>
defineClass(java.lang.String name, byte[] data)
Define a new Java class.void
linkClass(java.lang.Class<?> cl)
Link the given class.java.lang.Class<?>
loadClass(java.lang.String name, boolean resolve)
-
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, getDefinedPackage, getDefinedPackages, getName, getParent, getPlatformClassLoader, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus
-
-
-
-
Method Detail
-
defineClass
public java.lang.Class<?> defineClass(java.lang.String name, byte[] data)
Description copied from interface:GeneratedClassLoader
Define a new Java class. Classes created via this method should have the same class loader.- Specified by:
defineClass
in interfaceGeneratedClassLoader
- Parameters:
name
- fully qualified class namedata
- class byte code- Returns:
- new class object
-
linkClass
public void linkClass(java.lang.Class<?> cl)
Description copied from interface:GeneratedClassLoader
Link the given class.- Specified by:
linkClass
in interfaceGeneratedClassLoader
- Parameters:
cl
- Class instance returned from the previous call toGeneratedClassLoader.defineClass(String, byte[])
- See Also:
ClassLoader
-
loadClass
public java.lang.Class<?> loadClass(java.lang.String name, boolean resolve) throws java.lang.ClassNotFoundException
- Throws:
java.lang.ClassNotFoundException
-
-