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

com.github.fierioziy.utils.TempClassLoader Maven / Gradle / Ivy

There is a newer version: 2.0.3
Show newest version
package com.github.fierioziy.utils;

/**
 * 

A basic classloader with public method for class definition.

*/ public class TempClassLoader extends ClassLoader { /** *

Construct a new class loader linked to parameter class loader.

* * @param parent a parent class loader to which this * class loader belongs. */ public TempClassLoader(ClassLoader parent) { super(parent); } /** *

Defines a class with parameter name and bytecode * stored in {@code byte[]} array.

* * @param name name of the class to define. * @param b a {@code byte[]} array containing bytecode of class * to define. * @return a {@code Class} object made * from provided bytecode. */ public Class defineClass(String name, byte[] b) { return super.defineClass(name, b, 0, b.length); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy