net.sf.xmlmatcher.matcher
Class MatcherImpl
java.lang.Object
net.sf.xmlmatcher.matcher.MatcherImpl
- All Implemented Interfaces:
- Matcher
- Direct Known Subclasses:
- AttributesMatcher, JsProcessor, MatcherChain, StrategyBasedMatcher, TagNamesMatcher
public abstract class MatcherImpl
- extends java.lang.Object
- implements Matcher
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MatcherImpl
public MatcherImpl()
getTopLevelMatcher
public Matcher getTopLevelMatcher()
- Matchers may be organized into tree using MatcherChain class.
When this happens each matcher in the tree stores reference to top-level matcher
(usually instance of MatcherChain).
- Specified by:
getTopLevelMatcher
in interface Matcher
setTopLevelMatcher
public void setTopLevelMatcher(Matcher matcher)
- Specified by:
setTopLevelMatcher
in interface Matcher
- See Also:
getTopLevelMatcher()
addListener
public void addListener(MatcherListener listnr)
- Specified by:
addListener
in interface Matcher
removeListener
public void removeListener(MatcherListener listnr)
- Specified by:
removeListener
in interface Matcher
matchElements
public abstract void matchElements(org.w3c.dom.Element template,
org.w3c.dom.Element actual)
throws MatcherException
- Compare two XML trees specified by given elements.
Verifies that template and actual elements have the same tag name and namespace, then
invokes most appropriate comparator based on template element.
- Parameters:
template
- Template Elementactual
- Actual Element (instance)
- Throws:
MatcherException
match
public final void match(org.w3c.dom.Element template,
org.w3c.dom.Element actual)
throws MatcherException
- Description copied from interface:
Matcher
- Compare two XML trees specified by given elements.
Verifies that template and actual elements have the same tag name and namespace, then
invokes most appropriate comparator based on template element.
- Specified by:
match
in interface Matcher
- Parameters:
template
- Template Elementactual
- Actual Element (instance)
- Throws:
MatcherException
Copyright © 2007. All Rights Reserved.