public abstract class TextDifferenceListenerBase extends Object implements DifferenceListener
Subclasses get a chance to hook into special methods that will be invoked for differences in textual values of attributes, CDATA sections, Text or comment nodes.
RETURN_ACCEPT_DIFFERENCE, RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL, RETURN_IGNORE_DIFFERENCE_NODES_SIMILAR, RETURN_UPGRADE_DIFFERENCE_NODES_DIFFERENT| Modifier | Constructor and Description |
|---|---|
protected |
TextDifferenceListenerBase(DifferenceListener delegateTo)
Creates a new instance
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
attributeDifference(Difference d)
Delegates to
textualDifference. |
protected int |
cdataDifference(Difference d)
Delegates to
textualDifference. |
protected int |
commentDifference(Difference d)
Delegates to
textualDifference. |
int |
differenceFound(Difference difference)
Delegates to the nested DifferenceListener unless the
Difference is of type
ATTR_VALUE_ID, CDATA_VALUE_ID, COMMENT_VALUE_ID or TEXT_VALUE_ID - for those special differences attributeDifference, cdataDifference, commentDifference or textDifference
are invoked respectively. |
void |
skippedComparison(Node control,
Node test)
Receive notification that a comparison between 2 nodes has been skipped
because the node types are not comparable by the DifferenceEngine
|
protected int |
textDifference(Difference d)
Delegates to
textualDifference. |
protected int |
textualDifference(Difference d)
Delegates to the nested DifferenceListener.
|
protected TextDifferenceListenerBase(DifferenceListener delegateTo)
delegateTo - the DifferenceListener to delegate to.public int differenceFound(Difference difference)
ATTR_VALUE_ID, CDATA_VALUE_ID, COMMENT_VALUE_ID or TEXT_VALUE_ID - for those special differences attributeDifference, cdataDifference, commentDifference or textDifference
are invoked respectively.differenceFound in interface DifferenceListenerdifference - a Difference instance as defined in DifferenceConstants describing the cause
of the difference and containing the detail of the nodes that
differprotected int attributeDifference(Difference d)
textualDifference.d - the differenceprotected int cdataDifference(Difference d)
textualDifference.d - the differenceprotected int commentDifference(Difference d)
textualDifference.d - the differenceprotected int textDifference(Difference d)
textualDifference.d - the differenceprotected int textualDifference(Difference d)
d - the differencepublic void skippedComparison(Node control, Node test)
DifferenceListenerskippedComparison in interface DifferenceListenercontrol - the control node being comparedtest - the test node being comparedDifferenceEngineCopyright © 2001–2025 XMLUnit. All rights reserved.