groovy.lang
Class GroovyClassLoader.InnerLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
groovy.lang.GroovyClassLoader
groovy.lang.GroovyClassLoader.InnerLoader
- Enclosing class:
- GroovyClassLoader
public static class GroovyClassLoader.InnerLoader
- extends GroovyClassLoader
Methods inherited from class groovy.lang.GroovyClassLoader |
createCollector, createCompilationUnit, defineClass, defineClass, defineClass, defineClass, expandClassPath, generateScriptName, getClassCacheEntry, getClassPath, getPermissions, getTimeStamp, isRecompilable, isShouldRecompile, isSourceNewer, loadClass, loadClass, parseClass, parseClass, parseClass, parseClass, parseClass, parseClass, recompile, removeClassCacheEntry, setClassCacheEntry, setShouldRecompile |
Methods inherited from class java.lang.ClassLoader |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GroovyClassLoader.InnerLoader
public GroovyClassLoader.InnerLoader(GroovyClassLoader delegate)
addClasspath
public void addClasspath(String path)
- Description copied from class:
GroovyClassLoader
- adds a classpath to this classloader.
- Overrides:
addClasspath
in class GroovyClassLoader
- Parameters:
path
- is a jar file or a directory.- See Also:
GroovyClassLoader.addURL(URL)
clearCache
public void clearCache()
- Description copied from class:
GroovyClassLoader
- removes all classes from the class cache.
- Overrides:
clearCache
in class GroovyClassLoader
- See Also:
GroovyClassLoader.getClassCacheEntry(String)
,
GroovyClassLoader.setClassCacheEntry(Class)
,
GroovyClassLoader.removeClassCacheEntry(String)
findResource
public URL findResource(String name)
- Overrides:
findResource
in class URLClassLoader
findResources
public Enumeration findResources(String name)
throws IOException
- Overrides:
findResources
in class URLClassLoader
- Throws:
IOException
getLoadedClasses
public Class[] getLoadedClasses()
- Description copied from class:
GroovyClassLoader
Returns all Groovy classes loaded by this class loader.
- Overrides:
getLoadedClasses
in class GroovyClassLoader
- Returns:
- all classes loaded by this class loader
getResource
public URL getResource(String name)
- Overrides:
getResource
in class ClassLoader
getResourceAsStream
public InputStream getResourceAsStream(String name)
- Overrides:
getResourceAsStream
in class ClassLoader
getResourceLoader
public GroovyResourceLoader getResourceLoader()
- Overrides:
getResourceLoader
in class GroovyClassLoader
getURLs
public URL[] getURLs()
- Overrides:
getURLs
in class URLClassLoader
loadClass
public Class loadClass(String name,
boolean lookupScriptFiles,
boolean preferClassOverScript,
boolean resolve)
throws ClassNotFoundException,
CompilationFailedException
- Description copied from class:
GroovyClassLoader
- loads a class from a file or a parent classloader.
- Overrides:
loadClass
in class GroovyClassLoader
- Parameters:
name
- of the class to be loadedlookupScriptFiles
- if false no lookup at files is done at allpreferClassOverScript
- if true the file lookup is only done if there is no classresolve
- @see ClassLoader#loadClass(java.lang.String, boolean)
- Returns:
- the class found or the class created from a file lookup
- Throws:
ClassNotFoundException
- if the class could not be found
CompilationFailedException
- if the source file could not be compiled
parseClass
public Class parseClass(GroovyCodeSource codeSource,
boolean shouldCache)
throws CompilationFailedException
- Description copied from class:
GroovyClassLoader
- Parses the given code source into a Java class. If there is a class file
for the given code source, then no parsing is done, instead the cached class is returned.
- Overrides:
parseClass
in class GroovyClassLoader
shouldCache
- if true then the generated class will be stored in the source cache
- Returns:
- the main class defined in the given script
- Throws:
CompilationFailedException
setResourceLoader
public void setResourceLoader(GroovyResourceLoader resourceLoader)
- Overrides:
setResourceLoader
in class GroovyClassLoader
addURL
public void addURL(URL url)
- Description copied from class:
GroovyClassLoader
- adds a URL to the classloader.
- Overrides:
addURL
in class GroovyClassLoader
- Parameters:
url
- the new classpath element
getTimeStamp
public long getTimeStamp()