public class ReflectorLoader extends ClassLoader
Constructor | Description |
---|---|
ReflectorLoader(ClassLoader parent) |
creates a ReflectorLoader.
|
Modifier and Type | Method | Description |
---|---|---|
Class |
defineClass(String name,
byte[] bytecode,
ProtectionDomain domain) |
helper method to define Reflector classes.
|
protected Class |
findClass(String name) |
Tries to find a Groovy class.
|
Class |
getLoadedClass(String name) |
try to load one of the defined Reflector classes by name.
|
protected Class |
loadClass(String name,
boolean resolve) |
Loads a class per name.
|
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResource, findResources, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public ReflectorLoader(ClassLoader parent)
parent
- the parent loader. This should never be null!protected Class findClass(String name) throws ClassNotFoundException
findClass
in class ClassLoader
ClassNotFoundException
- if not foundprotected Class loadClass(String name, boolean resolve) throws ClassNotFoundException
loadClass
in class ClassLoader
name
- of the class to loadresolve
- is true if the class should be resolvedClassNotFoundException
Reflector
,
ClassLoader.loadClass(String, boolean)
public Class defineClass(String name, byte[] bytecode, ProtectionDomain domain)
name
- of the Reflectorbytecode
- the bytecodedomain
- the protection domain