public class TypeGraphXmlPrintVisitor extends TypeGraphPrintVisitor
Title: Framework Support Library
Description: A visitor class, which is used for printing of a type graph
(see TypeGraph
) in an xml format.
<Test> <map type="HashMap"> <key type="String"/> <value type="Test"/> </map> <str type="String"/> <list type="ArrayList"> <value type="Test"/> </list> </Test>
Copyright: Copyright (c) 2011
Company: StreamScape Technologies
Constructor and Description |
---|
TypeGraphXmlPrintVisitor() |
Modifier and Type | Method and Description |
---|---|
void |
afterChildrenVisit(TypeGraph node,
int level)
Prints the end xml tag for the current node if it has children
|
boolean |
visit(TypeGraph node,
int level)
Prints the start xml tag for the current node
|
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) throws TypeAnalyzerException
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.TypeAnalyzerException
- If outputting to the current stream failed for the graph nodeCopyright © 2015-2024 StreamScape Technologies. All rights reserved.