groovy.lang
Class GroovyClassLoader

java.lang.Object
  |
  +--java.lang.ClassLoader
        |
        +--groovy.lang.GroovyClassLoader

public class GroovyClassLoader
extends ClassLoader

A ClassLoader which can load Groovy classes

Version:
$Revision: 1.4 $
Author:
James Strachan

Constructor Summary
GroovyClassLoader()
           
GroovyClassLoader(ClassLoader loader)
           
 
Method Summary
protected  org.codehaus.groovy.classgen.CompilerFacade createCompiler(org.codehaus.groovy.ast.CompileUnit unit)
           
 Class defineClass(org.codehaus.groovy.ast.ClassNode classNode, String file)
          Loads the given class node returning the implementation Class
protected  void onClassNode(org.objectweb.asm.ClassWriter classWriter, org.codehaus.groovy.ast.ClassNode classNode)
           
 Class parseClass(InputStream in, String file)
          Parses the given character stream into a Java class capable of being run
 Class parseClass(String file)
          Parses the given file name into a Java class capable of being run
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroovyClassLoader

public GroovyClassLoader()

GroovyClassLoader

public GroovyClassLoader(ClassLoader loader)
Method Detail

defineClass

public Class defineClass(org.codehaus.groovy.ast.ClassNode classNode,
                         String file)
Loads the given class node returning the implementation Class

Parameters:
classNode -
Returns:

parseClass

public Class parseClass(String file)
                 throws SyntaxException,
                        IOException
Parses the given file name into a Java class capable of being run

Returns:
the main class defined in the given script
SyntaxException
IOException

parseClass

public Class parseClass(InputStream in,
                        String file)
                 throws SyntaxException,
                        IOException
Parses the given character stream into a Java class capable of being run

Returns:
the main class defined in the given script
SyntaxException
IOException

onClassNode

protected void onClassNode(org.objectweb.asm.ClassWriter classWriter,
                           org.codehaus.groovy.ast.ClassNode classNode)

createCompiler

protected org.codehaus.groovy.classgen.CompilerFacade createCompiler(org.codehaus.groovy.ast.CompileUnit unit)


Copyright © 2003 The Codehaus. All Rights Reserved.