BytecodeLoader.Loader (Jython API documentation)
Date: 2024-08-18

org.python.core

## Class BytecodeLoader.Loader

- java.lang.Object
- - java.lang.ClassLoader
  - - java.security.SecureClassLoader
    - - java.net.URLClassLoader
      - - org.python.core.BytecodeLoader.Loader

- All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable
  Enclosing class:
    BytecodeLoader

      public static class BytecodeLoader.Loader
      extends java.net.URLClassLoader

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Loader()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addParent(java.lang.ClassLoader referent)` Add given loader at the front of the list of the parent list (if not `null`).
    `java.lang.Class<?>` | `loadClassFromBytes(java.lang.String name, byte[] data)` Define the named class using the class file data provided, and resolve it.

    - ### Methods inherited from class java.net.URLClassLoader

      `close, findResource, findResources, getResourceAsStream, getURLs, newInstance, newInstance`

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

      `clearAssertionStatus, getParent, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus`

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

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

- - ### Constructor Detail

    - #### Loader

          public Loader()

  - ### Method Detail

    - #### addParent

          public void addParent(java.lang.ClassLoader referent)

      Add given loader at the front of the list of the parent list (if not `null`).

    - #### loadClassFromBytes

          public java.lang.Class<?> loadClassFromBytes(java.lang.String name,
                                                       byte[] data)

      Define the named class using the class file data provided, and resolve it. (See JVM specification.) For class names ending "$py", this method may adjust that name to that found in the class file itself.
      Parameters:
        `name` - fully-qualified binary name of the class
        `data` - a class file as a byte array
      Returns:
        the defined and resolved class

Jython homepage