| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
defineClass() is a protected method of the ClassLoader class that allows you to convert a byte array into an instance of the class 'Class'.
I added the ability to use this method in any ClassLoader and extended its functionality.
/*
* Example of creating a new instance
* of a compiled Test.class
* with defineClass()
*/
try {
Class<?> testClass = Define.defineClass(
getClass().getClassLoader(),
Paths.get("./classes/Test.class"));
testClass.newInstance();
} catch (Exception e) {
throw new RuntimeException(e);
}The project is an open source project distributed under the Apache License 2.0
The project is in beta. Use at your own risk.
| Back | FazBrowse Home | New Git URL |