All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class epp.Emitter

java.lang.Object
   |
   +----epp.Emitter

public abstract class Emitter
extends Object
The Emitter class is the super class of all Emitter objects.

Within the code-emitting pass, abstract syntax trees are converted into character strings and are written to output files. The Emitter object is the object that converts each node of the absrtact syntax tree into character strings. For each type of node, a corresponding Emitter object will be defined. For example, the class that generates a "for" statement is ForEmitter class.

Plug-in programmers normally should not use this class.


Constructor Index

 o Emitter()

Method Index

 o call(OutputStream, Tree)
Converts the specified tree argument into a character string and writes it.
 o checkArgsLength(Tree, int)
 o emitString(OutputStream, String)
 o emitTree(OutputStream, Tree)
Generates Tree recursively.
 o error(String)
 o outputNewlineAndIndent(OutputStream)
 o outputNewlineForReadability(OutputStream)

Constructors

 o Emitter
 public Emitter()

Methods

 o call
 public abstract void call(OutputStream out,
                           Tree tree) throws IOException
Converts the specified tree argument into a character string and writes it. A subclass that defines this method must be defined for each type of node.

 o emitTree
 public static void emitTree(OutputStream out,
                             Tree tree)
Generates Tree recursively. This method searches the emitterTable and retrieves an Emitter object that matches the specified tree and then calls the call method. This method can be used to generate a subtree recursively from within the call method.

 o emitString
 public static void emitString(OutputStream out,
                               String str) throws IOException
 o checkArgsLength
 public static void checkArgsLength(Tree tree,
                                    int argc)
 o outputNewlineAndIndent
 public static void outputNewlineAndIndent(OutputStream out) throws IOException
 o outputNewlineForReadability
 public static void outputNewlineForReadability(OutputStream out) throws IOException
 o error
 public static Error error(String str)

All Packages  Class Hierarchy  This Package  Previous  Next  Index