org.codehaus.groovy.classgen
Class CompilerFacade

java.lang.Object
  |
  +--org.codehaus.groovy.classgen.CompilerFacade

public abstract class CompilerFacade
extends Object

A simple facade for the Compiler, hiding much of the plumbing between the Lexer, Parser, AST and bytecode generator

Version:
$Revision: 1.6 $
Author:
James Strachan

Constructor Summary
CompilerFacade(ClassLoader classLoader, org.codehaus.groovy.ast.CompileUnit unit)
           
 
Method Summary
 void generateClass(org.codehaus.groovy.classgen.GeneratorContext context, org.codehaus.groovy.ast.ClassNode classNode, String file)
           
protected abstract  void onClass(org.objectweb.asm.ClassWriter classWriter, org.codehaus.groovy.ast.ClassNode classNode)
           
protected  void parseClass(org.codehaus.groovy.syntax.lexer.CharStream charStream, String file)
           
 void parseClass(InputStream in, String file)
          Parses the given character stream into a number of ClassNode instances
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompilerFacade

public CompilerFacade(ClassLoader classLoader,
                      org.codehaus.groovy.ast.CompileUnit unit)
Method Detail

parseClass

public void parseClass(InputStream in,
                       String file)
                throws SyntaxException,
                       IOException
Parses the given character stream into a number of ClassNode instances

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

generateClass

public void generateClass(org.codehaus.groovy.classgen.GeneratorContext context,
                          org.codehaus.groovy.ast.ClassNode classNode,
                          String file)

parseClass

protected void parseClass(org.codehaus.groovy.syntax.lexer.CharStream charStream,
                          String file)
                   throws SyntaxException,
                          IOException
SyntaxException
IOException

onClass

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


Copyright © 2003 The Codehaus. All Rights Reserved.