com.go.tea.util
Class FileCompiler.Unit

java.lang.Object
  |
  +--com.go.tea.compiler.CompilationUnit
        |
        +--com.go.tea.util.FileCompiler.Unit
All Implemented Interfaces:
ErrorListener, java.util.EventListener
Enclosing class:
FileCompiler

public class FileCompiler.Unit
extends CompilationUnit


Method Summary
 java.io.File getDestinationFile()
           
 java.io.OutputStream getOutputStream()
           
 java.io.Reader getReader()
           
 java.io.File getSourceFile()
           
 java.lang.String getSourceFileName()
           
 java.lang.String getTargetPackage()
          Return the package name that this CompilationUnit should be compiled into.
 boolean shouldCompile()
           
 
Methods inherited from class com.go.tea.compiler.CompilationUnit
compileError, getCompiler, getErrorCount, getImportedPackages, getName, getParseTree, getShortName, setParseTree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTargetPackage

public java.lang.String getTargetPackage()
Description copied from class: CompilationUnit
Return the package name that this CompilationUnit should be compiled into. Default implementation returns null, or no package.
Overrides:
getTargetPackage in class CompilationUnit

getSourceFileName

public java.lang.String getSourceFileName()
Overrides:
getSourceFileName in class CompilationUnit

getSourceFile

public java.io.File getSourceFile()

getReader

public java.io.Reader getReader()
                         throws java.io.IOException
Overrides:
getReader in class CompilationUnit
Following copied from class: com.go.tea.compiler.CompilationUnit
Returns:
A new source file reader.

shouldCompile

public boolean shouldCompile()
Overrides:
shouldCompile in class CompilationUnit
Following copied from class: com.go.tea.compiler.CompilationUnit
Returns:
true if the CompilationUnit should be compiled. Default is true.

getDestinationFile

public java.io.File getDestinationFile()
Returns:
the file that gets written by the compiler.

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Overrides:
getOutputStream in class CompilationUnit
Following copied from class: com.go.tea.compiler.CompilationUnit
Returns:
An OutputStream to write compiled code to. Returning null is disables code generation for this CompilationUnit.