public class TypeGraphPrettyPrintVisitor extends TypeGraphPrintVisitor
Title: Framework Support Library
Description: A visitor class, which is used for printing of a type graph
(see TypeGraph
) in a pretty text format.
Test | +-- map (HashMap) | | | +-- key (String) | | | +-- value (Test) | +-- str (String) | +-- list (ArrayList) | +-- value (Test)
Copyright: Copyright (c) 2011
Company: StreamScape Technologies
Constructor and Description |
---|
TypeGraphPrettyPrintVisitor() |
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. |
boolean |
visit(TypeGraph node,
int level)
Prints the current node of the tree in a pretty text format.
|
setOutput
public boolean visit(TypeGraph node, int level) throws TypeAnalyzerException
visit
in interface TypeGraphVisitor
visit
in class TypeGraphPrintVisitor
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)
TypeGraphVisitor
TypeGraph.traverse(TypeGraphVisitor)
method after all the children of the specified node
are
traversed together with subtrees.afterChildrenVisit
in interface TypeGraphVisitor
afterChildrenVisit
in class TypeGraphPrintVisitor
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.Copyright © 2015-2024 StreamScape Technologies. All rights reserved.