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