Package org.lwjgl.util.mapped
Class MappedObjectClassLoader
- java.lang.Object
-
- java.lang.ClassLoader
-
- java.security.SecureClassLoader
-
- java.net.URLClassLoader
-
- org.lwjgl.util.mapped.MappedObjectClassLoader
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class MappedObjectClassLoader extends java.net.URLClassLoader
This classloader is responsible for applying the bytecode transformation to mapped objects. The transformation can either be applied using a Java agent, or with the convenientfork(java.lang.Class<?>, java.lang.String[])
method.- Author:
- Riven
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
fork(java.lang.Class<?> mainClass, java.lang.String[] args)
Forks the specified class containing a main method, passing the specified arguments.protected java.lang.Class<?>
loadClass(java.lang.String name, boolean resolve)
protected java.lang.Class<?>
loadMappedObject()
-
Methods inherited from class java.net.URLClassLoader
addURL, close, definePackage, findClass, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstance
-
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
-
-
-
Method Detail
-
fork
public static boolean fork(java.lang.Class<?> mainClass, java.lang.String[] args)
Forks the specified class containing a main method, passing the specified arguments. Seeorg.lwjgl.test.mapped.TestMappedObject
for example usage.- Parameters:
mainClass
- the class containing the main methodargs
- the arguments to pass- Returns:
- true if the fork was successful.
-
loadMappedObject
protected java.lang.Class<?> loadMappedObject() throws java.lang.ClassNotFoundException
- Throws:
java.lang.ClassNotFoundException
-
loadClass
protected java.lang.Class<?> loadClass(java.lang.String name, boolean resolve) throws java.lang.ClassNotFoundException
- Overrides:
loadClass
in classjava.lang.ClassLoader
- Throws:
java.lang.ClassNotFoundException
-
-