Class DiffNodeLabelPrettyfier
java.lang.Object
org.variantsync.diffdetective.variation.diff.serialize.nodeformat.DiffNodeLabelPrettyfier
Making methods accessible for
DiffNodeLabelFormat
for formatting the output of DiffNodes
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
prettyPrintIfAnnotationOr
(DiffNode<?> node, String elseValue) InvokesprettyPrintTypeAndMapping(DiffNode)
if the given nodeis an annotation
, and returns the elseValue otherwise.private static String
prettyPrintTypeAndMapping
(DiffNode<?> node) Auxiliary method forprettyPrintIfAnnotationOr(DiffNode, String)
.
-
Constructor Details
-
DiffNodeLabelPrettyfier
public DiffNodeLabelPrettyfier()
-
-
Method Details
-
prettyPrintTypeAndMapping
Auxiliary method forprettyPrintIfAnnotationOr(DiffNode, String)
. Returns a string starting with the nodesDiffNode.getNodeType()
, and itsDiffNode.getFormula()
if it has a formula.- Parameters:
node
- TheDiffNode
to print.- Returns:
- NodeType and
DiffNode.getFormula()
of the node in a single string, seperated by a space character.
-
prettyPrintIfAnnotationOr
InvokesprettyPrintTypeAndMapping(DiffNode)
if the given nodeis an annotation
, and returns the elseValue otherwise.- Parameters:
node
- TheDiffNode
to prettyprint.elseValue
- The value to return in case the given node is not an annotation.- Returns:
- The generated label.
-