public class ASTDump
extends org.eclipse.jdt.core.dom.ASTVisitor
Red (tfeng) |
Red (tfeng) |
Constructor and Description |
---|
ASTDump(java.lang.StringBuffer buffer)
Construct an AST dump with a
StringBuffer where the
output will be added. |
ASTDump(java.io.Writer writer)
Construct an AST dump with a writer to which the
output will be written.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args)
Read in one or more Java source files, parse them with the
Eclipse parser, and output their AST structure to standard
output.
|
void |
postVisit(org.eclipse.jdt.core.dom.ASTNode node)
End the visiting of a node (and all its children), and decrease
the indent amount.
|
void |
preVisit(org.eclipse.jdt.core.dom.ASTNode node)
Visit a node in the AST and output it.
|
endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, preVisit2, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
public ASTDump(java.lang.StringBuffer buffer)
StringBuffer
where the
output will be added.buffer
- The string buffer to be used.public ASTDump(java.io.Writer writer)
writer
- The writer to write to.public static void main(java.lang.String[] args) throws java.lang.Exception
args
- The names of Java source files.java.lang.Exception
- If any error occurs.public void postVisit(org.eclipse.jdt.core.dom.ASTNode node)
postVisit
in class org.eclipse.jdt.core.dom.ASTVisitor
node
- The node that have been visited.public void preVisit(org.eclipse.jdt.core.dom.ASTNode node)
Expression
, its content is also output. If the AST has been
type-checked with TypeAnalyzer
, the type (if any)
associated with each node is also output.preVisit
in class org.eclipse.jdt.core.dom.ASTVisitor
node
- The node to be visited.