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.| Constructor and Description |
|---|
ToMapPrintingVisitor(Object working,
Object base) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
protected String |
differenceToString(Node node,
Object base,
Object modified) |
String |
getMessage(PropertyPath path) |
Map<PropertyPath,String> |
getMessages() |
String |
getMessagesAsString() |
boolean |
hasMessages() |
protected void |
print(String text) |
String |
toString() |
accept, filterprotected void print(String text)
print in class PrintingVisitorprotected String differenceToString(Node node, Object base, Object modified)
differenceToString in class PrintingVisitorpublic void clear()
public Map<PropertyPath,String> getMessages()
public String getMessage(PropertyPath path)
public boolean hasMessages()
public String getMessagesAsString()
Copyright © 2012. All Rights Reserved.