Class XPathExpressionComparator
- java.lang.Object
-
- com.crawljax.oraclecomparator.AbstractComparator
-
- com.crawljax.oraclecomparator.comparators.XPathExpressionComparator
-
- All Implemented Interfaces:
Comparator
public class XPathExpressionComparator extends AbstractComparator
Oracle which can ignore element/attributes by xpath expression.
-
-
Field Summary
Fields Modifier and Type Field Description private com.google.common.collect.ImmutableList<String>expressionsprivate static org.slf4j.LoggerLOGGER
-
Constructor Summary
Constructors Constructor Description XPathExpressionComparator(String... expressions)XPathExpressionComparator(Collection<String> expressions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringnormalize(String dom)Override this method to apply normalization to the comparison.-
Methods inherited from class com.crawljax.oraclecomparator.AbstractComparator
getDifferences, isEquivalent
-
-
-
-
Field Detail
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
expressions
private final com.google.common.collect.ImmutableList<String> expressions
-
-
Constructor Detail
-
XPathExpressionComparator
public XPathExpressionComparator(Collection<String> expressions)
- Parameters:
expressions- the xpath expressions to ignore
-
XPathExpressionComparator
public XPathExpressionComparator(String... expressions)
- Parameters:
expressions- the xpath expressions to ignore
-
-
Method Detail
-
normalize
public String normalize(String dom)
Description copied from class:AbstractComparatorOverride this method to apply normalization to the comparison.- Specified by:
normalizein interfaceComparator- Overrides:
normalizein classAbstractComparator- Parameters:
dom- the dom to ignore the xpath expressions from- Returns:
- the stripped dom with the elements found with the xpath expressions
-
-