public class TypeGraphPrintVisitor extends java.lang.Object implements TypeGraphVisitor
Title: Framework Support Library
Description: A visitor class, which is used for printing of a type graph (see TypeGraph
) in a text format.
Copyright: Copyright (c) 2011
Company: StreamScape Technologies
Constructor and Description |
---|
TypeGraphPrintVisitor() |
Modifier and Type | Method and Description |
---|---|
void |
afterChildrenVisit(TypeGraph node,
int level)
This method is called from
TypeGraph.traverse(TypeGraphVisitor)
method after all the children of the specified node are
traversed together with subtrees. |
void |
setOutput(java.io.OutputStream outputStream)
Sets the output stream used for type graph printing to the specified one
|
boolean |
visit(TypeGraph node,
int level)
Prints the current node of the tree including its modifiers, type and name
|
public void setOutput(java.io.OutputStream outputStream)
outputStream
- The output stream to be set for type graph printingpublic boolean visit(TypeGraph node, int level) throws TypeAnalyzerException
visit
in interface TypeGraphVisitor
node
- The node which is currently traversed by
TypeGraph.traverse(TypeGraphVisitor)
methodlevel
- The level of the currently traversed node in the spanning
tree of the traversed TypeGraph
.TypeAnalyzerException
- If outputting to the current stream failed for the graph nodepublic void afterChildrenVisit(TypeGraph node, int level) throws TypeAnalyzerException
TypeGraphVisitor
TypeGraph.traverse(TypeGraphVisitor)
method after all the children of the specified node
are
traversed together with subtrees.afterChildrenVisit
in interface TypeGraphVisitor
node
- The node which children have just been traversed by
TypeGraph.traverse(TypeGraphVisitor)
method.level
- The level in the traversed TypeGraph
spanning
tree of the node, which children have just been traversed.TypeAnalyzerException
- If an error occurred when visiting the graph nodeCopyright © 2015-2024 StreamScape Technologies. All rights reserved.