Class CallSiteClassLoader
java.lang.Object
java.lang.ClassLoader
org.codehaus.groovy.reflection.ClassLoaderForClassArtifacts
org.codehaus.groovy.runtime.callsite.CallSiteClassLoader
Class loader used when generating specialized classic call-site classes.
Prefer invokedynamic call sites for new code. Planned for deprecation/removal in a future Groovy version.
-
Field Summary
Fields inherited from class org.codehaus.groovy.reflection.ClassLoaderForClassArtifacts
klazz -
Constructor Summary
ConstructorsConstructorDescriptionCallSiteClassLoader(Class klazz) Creates a loader for artifacts ofklazz, using that class's loader as the parent. -
Method Summary
Methods inherited from class org.codehaus.groovy.reflection.ClassLoaderForClassArtifacts
createClassName, createClassName, define, defineClassAndGetConstructor, loadClassMethods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findClass, findLibrary, findLoadedClass, findResource, findResource, findResources, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
Constructor Details
-
CallSiteClassLoader
Creates a loader for artifacts ofklazz, using that class's loader as the parent.- Parameters:
klazz- the class whose loader, name, and protection domain are captured
-
-
Method Details
-
loadClass
Loads a known call-site or meta-class type from this class's defining loader. Any other name is delegated to the superclass, and aClassNotFoundExceptionfrom that delegation is retried on this class's defining loader.- Overrides:
loadClassin classClassLoader- Parameters:
name- the binary name to loadresolve- whether the class is linked after it is loaded- Returns:
- the loaded class
- Throws:
ClassNotFoundException- when neither loader can findname
-