com.go.tea.util
Class ResourceCompiler

java.lang.Object
  |
  +--com.go.tea.compiler.Compiler
        |
        +--com.go.tea.util.ResourceCompiler

public class ResourceCompiler
extends Compiler

ResourceCompiler compiles tea sources using the resource loading mechanism built into Java. The resource name must have the extension ".tea".

Version:
14 , 9/07/00
Author:
Brian S O'Neill
See Also:
Class.getResource(java.lang.String)

Constructor Summary
ResourceCompiler(ClassInjector injector)
           
 
Method Summary
 java.lang.String[] compile(java.lang.String name)
          Compile a single compilation unit.
 java.lang.String[] compile(java.lang.String[] names)
          Compile a list of compilation units.
protected  CompilationUnit createCompilationUnit(java.lang.String name)
           
 boolean sourceExists(java.lang.String name)
           
 
Methods inherited from class com.go.tea.compiler.Compiler
addErrorListener, addStatusListener, createCodeGenerator, createParser, createScanner, createSourceReader, createTypeChecker, getClassLoader, getCompilationUnit, getErrorCount, getImportedPackages, getRuntimeContext, getRuntimeContextMethods, getRuntimeReceiver, getRuntimeStringConverter, getStringConverterMethods, isCodeGenerationEnabled, isExceptionGuardianEnabled, loadClass, preserveParseTree, removeErrorListener, removeStatusListener, setClassLoader, setCodeGenerationEnabled, setExceptionGuardianEnabled, setRuntimeContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceCompiler

public ResourceCompiler(ClassInjector injector)
Parameters:
injector - ClassInjector to feed generated classes into
Method Detail

compile

public java.lang.String[] compile(java.lang.String name)
                           throws java.io.IOException
Description copied from class: Compiler
Compile a single compilation unit. This method can be called multiple times, but it will not compile compilation units that have already been compiled.
Overrides:
compile in class Compiler
Following copied from class: com.go.tea.compiler.Compiler
Parameters:
name - the fully qualified template name
Returns:
The names of all the sources compiled by this compiler
Throws:
java.io.IOException -  

compile

public java.lang.String[] compile(java.lang.String[] names)
                           throws java.io.IOException
Description copied from class: Compiler
Compile a list of compilation units. This method can be called multiple times, but it will not compile compilation units that have already been compiled.
Overrides:
compile in class Compiler
Following copied from class: com.go.tea.compiler.Compiler
Parameters:
names - an array of fully qualified template names
Returns:
The names of all the sources compiled by this compiler
Throws:
java.io.IOException -  

sourceExists

public boolean sourceExists(java.lang.String name)
Overrides:
sourceExists in class Compiler
Following copied from class: com.go.tea.compiler.Compiler
Returns:
true if source exists for the given qualified name

createCompilationUnit

protected CompilationUnit createCompilationUnit(java.lang.String name)
Overrides:
createCompilationUnit in class Compiler