All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.romanqed.jeflect.loader.DefineLoader Maven / Gradle / Ivy

The newest version!
package com.github.romanqed.jeflect.loader;

/**
 * An interface describing the mechanism that loads a class into memory.
 */
public interface DefineLoader {
    /**
     * Defines a class in memory and returns its instance.
     *
     * @param name   the name with which the class will be defined
     * @param buffer buffer containing the byte code of the class
     * @return the {@link Class} containing the loaded class
     */
    Class define(String name, byte[] buffer);

    /**
     * Loads the class with the specified binary name.
     *
     * @param name the binary name of the class
     * @return the resulting {@link Class} object, or null if class not found
     */
    Class load(String name);

    /**
     * @return the classloader used
     */
    ClassLoader getClassLoader();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy