public class ToMapPrintingVisitor extends PrintingVisitor
PrintingVisitor
, but instead of printing it to
System.out
, it will store the messages in a Map, identified by the property path of the
visited node. The Map
can later be accessed via getMessages()
to provide a way to
post-process the collected information.构造器和说明 |
---|
ToMapPrintingVisitor(java.lang.Object working,
java.lang.Object base) |
限定符和类型 | 方法和说明 |
---|---|
void |
clear() |
protected java.lang.String |
differenceToString(DiffNode node,
java.lang.Object base,
java.lang.Object modified) |
java.lang.String |
getMessage(NodePath path) |
java.util.Map<NodePath,java.lang.String> |
getMessages() |
java.lang.String |
getMessagesAsString() |
boolean |
hasMessages() |
protected void |
print(java.lang.String text) |
java.lang.String |
toString() |
filter, node
public ToMapPrintingVisitor(java.lang.Object working, java.lang.Object base)
protected void print(java.lang.String text)
print
在类中 PrintingVisitor
protected java.lang.String differenceToString(DiffNode node, java.lang.Object base, java.lang.Object modified)
differenceToString
在类中 PrintingVisitor
public void clear()
public java.util.Map<NodePath,java.lang.String> getMessages()
public java.lang.String getMessage(NodePath path)
public boolean hasMessages()
public java.lang.String getMessagesAsString()
public java.lang.String toString()
toString
在类中 java.lang.Object