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, 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`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefiningClassLoader

          public DefiningClassLoader()

    - #### DefiningClassLoader

          public DefiningClassLoader​(java.lang.ClassLoader parentLoader)

  - ### 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 interface `GeneratedClassLoader`
      Parameters:
        `name` - fully qualified class name
        `data` - 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 interface `GeneratedClassLoader`
      Parameters:
        `cl` - Class instance returned from the previous call to `GeneratedClassLoader.defineClass(String, byte[])`
      See Also:
        `ClassLoader`

    - #### loadClass

          public java.lang.Class<?> loadClass​(java.lang.String name,
                                              boolean resolve)
                                       throws java.lang.ClassNotFoundException

      Overrides:
        `loadClass` in class `java.lang.ClassLoader`
      Throws:
        `java.lang.ClassNotFoundException`