Top Fields Constructors Methods
org.codehaus.groovy.runtime.callsite

public Class CallSiteClassLoader

extends ClassLoaderForClassArtifacts
Class Inheritance
Imports
org.codehaus.groovy.reflection.ClassLoaderForClassArtifacts, java.util.Collections, .HashSet, .Set

Field Summary

Modifier and TypeField and Description
private static final Set<String>
Inherited from org.codehaus.groovy.reflection.ClassLoaderForClassArtifacts:
klazz

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected synchronized Class<T>
loadClass(String
The binary name of the class
name
,
boolean
If true then resolve the class
resolve
)

Overrides java.lang.ClassLoader.loadClass.

Loads the class with the specified binary name.
Inherited from org.codehaus.groovy.reflection.ClassLoaderForClassArtifacts:
createClassNamecreateClassNamedefinedefineClassAndGetConstructorloadClass

Field Detail

KNOWN_CLASSESback to summary
private static final Set<String> KNOWN_CLASSES

Constructor Detail

CallSiteClassLoaderback to summary
public CallSiteClassLoader(Class<T> klazz)

Method Detail

loadClassback to summary
protected synchronized Class<T> loadClass(String name, boolean resolve) throws ClassNotFoundException

Overrides java.lang.ClassLoader.loadClass.

Doc from java.lang.ClassLoader.loadClass.

Loads the class with the specified binary name. The default implementation of this method searches for classes in the following order:

  1. Invoke findLoadedClass(String) to check if the class has already been loaded.

  2. Invoke the loadClass method on the parent class loader. If the parent is null the class loader built into the virtual machine is used, instead.

  3. Invoke the findClass(String) method to find the class.

If the class was found using the above steps, and the resolve flag is true, this method will then invoke the resolveClass(Class) method on the resulting Class object.

Subclasses of ClassLoader are encouraged to override findClass(String), rather than this method.

Unless overridden, this method synchronizes on the result of getClassLoadingLock method during the entire class loading process.

Parameters
name:String

The binary name of the class

resolve:boolean

If true then resolve the class

Returns:Class<T>

The resulting Class object

Exceptions
ClassNotFoundException:
If the class could not be found