|
ESC/Java2 © 2003,2004,2005 David Cok and Joseph Kiniry © 2005 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavafe.ast.PrettyPrint
javafe.ast.StandardPrettyPrint
Field Summary |
Fields inherited from class javafe.ast.PrettyPrint |
displayInferred, INDENT, inst, self |
Constructor Summary | |
StandardPrettyPrint()
|
|
StandardPrettyPrint(PrettyPrint self)
|
Method Summary | |
(package private) void |
displayBody(java.io.OutputStream o,
int ind,
BlockStmt body,
boolean showBody,
boolean specOnly,
java.lang.String kind)
|
void |
print(java.io.OutputStream o,
CompilationUnit cu)
Print a compilation onto to a stream. |
void |
print(java.io.OutputStream o,
GenericVarDecl d)
|
void |
print(java.io.OutputStream o,
int ind,
ExprVec es)
|
void |
print(java.io.OutputStream o,
int ind,
FieldDecl d,
boolean showBody)
|
void |
print(java.io.OutputStream o,
int ind,
FormalParaDeclVec fps)
|
void |
print(java.io.OutputStream o,
int ind,
LocalVarDecl d,
boolean showBody)
|
void |
print(java.io.OutputStream o,
int ind,
ModifierPragma mp)
Print a member or static initializer of a type declaration. |
void |
print(java.io.OutputStream o,
int ind,
ObjectDesignator od)
|
void |
print(java.io.OutputStream o,
int ind,
Stmt s)
Print a statement. |
void |
print(java.io.OutputStream o,
int ind,
StmtPragma sp)
|
void |
print(java.io.OutputStream o,
int ind,
TypeDeclElem d,
Identifier classId,
boolean showBody)
Print a member or static initializer of a type declaration. |
void |
print(java.io.OutputStream o,
int ind,
TypeDeclElemPragma tp)
|
void |
print(java.io.OutputStream o,
int ind,
TypeModifierPragma tp)
|
void |
print(java.io.OutputStream o,
int ind,
TypeModifierPragmaVec t)
|
void |
print(java.io.OutputStream o,
int ind,
VarInit e)
|
void |
print(java.io.OutputStream o,
LexicalPragma lp)
Print a lexical pragma. |
void |
print(java.io.OutputStream o,
Name n)
|
void |
print(java.io.OutputStream o,
Type t)
|
void |
print(java.io.OutputStream o,
TypeNameVec tns)
|
static void |
println(VarInit e)
|
void |
printnoln(java.io.OutputStream o,
int ind,
TypeDecl d)
Print a type declaration onto to a stream, without a final newline. |
static java.lang.String |
toCanonicalString(int tag,
java.lang.Object val)
Requires that tag is one of constants on the left of this
table:
TagConstants.BOOLEANLIT Boolean
TagConstants.CHARLIT Integer
TagConstants.DOUBLELIT Double
TagConstants.FLOATLIT Float
TagConstants.INTLIT Integer
TagConstants.LONGLIT Long
TagConstants.STRINGLIT String
and that val is an instance of the corresponding type
on the right. |
java.lang.String |
unknownTag(ASTNode n)
Generate text to describe a ASTNote with an unknown tag |
java.lang.String |
unknownTagMsg(int tag)
Generate text to describe a given unknown tag |
Methods inherited from class javafe.ast.PrettyPrint |
print, println, println, println, spaces, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, write, write, writeln, writeln |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StandardPrettyPrint()
public StandardPrettyPrint(PrettyPrint self)
Method Detail |
public void print(java.io.OutputStream o, CompilationUnit cu)
PrettyPrint
o
is
positioned at the start of a new line.
print
in class PrettyPrint
public void printnoln(java.io.OutputStream o, int ind, TypeDecl d)
PrettyPrint
printnoln
in class PrettyPrint
public void print(java.io.OutputStream o, int ind, Stmt s)
PrettyPrint
s
should be printed starting
at the current position of o
. It does not print
a new-line at the end of the statement. However, if the statement needs to
span multiple lines (for example, because it has embedded statements), then
these lines are indented by ind
spaces.
print
in class PrettyPrint
public void print(java.io.OutputStream o, int ind, TypeDeclElem d, Identifier classId, boolean showBody)
PrettyPrint
s
should be printed starting at the current position of
o
. If the declaration needs to span multiple lines (for
example, to print the statements in the body of a method), then these lines
are indented by ind
spaces. It should leave o
at the start of a new-line.
print
in class PrettyPrint
void displayBody(java.io.OutputStream o, int ind, BlockStmt body, boolean showBody, boolean specOnly, java.lang.String kind)
public void print(java.io.OutputStream o, TypeNameVec tns)
print
in class PrettyPrint
public void print(java.io.OutputStream o, int ind, FormalParaDeclVec fps)
print
in class PrettyPrint
public void print(java.io.OutputStream o, int ind, ExprVec es)
print
in class PrettyPrint
public void print(java.io.OutputStream o, GenericVarDecl d)
print
in class PrettyPrint
public void print(java.io.OutputStream o, int ind, LocalVarDecl d, boolean showBody)
print
in class PrettyPrint
public void print(java.io.OutputStream o, int ind, FieldDecl d, boolean showBody)
print
in class PrettyPrint
public void print(java.io.OutputStream o, Type t)
print
in class PrettyPrint
public void print(java.io.OutputStream o, Name n)
print
in class PrettyPrint
public static void println(VarInit e)
public void print(java.io.OutputStream o, int ind, VarInit e)
print
in class PrettyPrint
public void print(java.io.OutputStream o, int ind, ObjectDesignator od)
print
in class PrettyPrint
public static java.lang.String toCanonicalString(int tag, java.lang.Object val)
tag
is one of constants on the left of this
table:
TagConstants.BOOLEANLIT Boolean
TagConstants.CHARLIT Integer
TagConstants.DOUBLELIT Double
TagConstants.FLOATLIT Float
TagConstants.INTLIT Integer
TagConstants.LONGLIT Long
TagConstants.STRINGLIT String
and that val
is an instance of the corresponding type
on the right.
- Returns:
- a canonical text representation for literal values.
public void print(java.io.OutputStream o, LexicalPragma lp)
PrettyPrint
o
is at the start of the
line; should leave o
at the start of a new line.
print
in class PrettyPrint
public void print(java.io.OutputStream o, int ind, TypeDeclElemPragma tp)
print
in class PrettyPrint
public void print(java.io.OutputStream o, int ind, ModifierPragma mp)
PrettyPrint
s
should be printed starting at the current position of
o
. If the declaration needs to span multiple lines (for
example, to print the statements in the body of a method), then these lines
are indented by ind
spaces. It should leave o
at the start of a new-line.
print
in class PrettyPrint
public void print(java.io.OutputStream o, int ind, StmtPragma sp)
print
in class PrettyPrint
public void print(java.io.OutputStream o, int ind, TypeModifierPragma tp)
print
in class PrettyPrint
public void print(java.io.OutputStream o, int ind, TypeModifierPragmaVec t)
public java.lang.String unknownTag(ASTNode n)
public java.lang.String unknownTagMsg(int tag)
|
ESC/Java2 © 2003,2004,2005 David Cok and Joseph Kiniry © 2005 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |