net.sf.xmlmatcher.matcher
Class RegistryMatchingStrategySelector

java.lang.Object
  extended by net.sf.xmlmatcher.matcher.RegistryMatchingStrategySelector
All Implemented Interfaces:
MatchingStrategySelector

public class RegistryMatchingStrategySelector
extends java.lang.Object
implements MatchingStrategySelector

Simple MatchingStrategySelector that has a sequence of supported strategies. This selector returns the first appropriate strategy in order they appear in the sequence.


Field Summary
protected  java.util.List<MatchingStrategy> mStrategies
           
 
Constructor Summary
RegistryMatchingStrategySelector()
           
RegistryMatchingStrategySelector(java.util.List<MatchingStrategy> strategies)
           
 
Method Summary
 MatchingStrategy select(org.w3c.dom.Element template)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mStrategies

protected final java.util.List<MatchingStrategy> mStrategies
Constructor Detail

RegistryMatchingStrategySelector

public RegistryMatchingStrategySelector()

RegistryMatchingStrategySelector

public RegistryMatchingStrategySelector(java.util.List<MatchingStrategy> strategies)
Method Detail

select

public MatchingStrategy select(org.w3c.dom.Element template)
                        throws InvalidTemplateException
Specified by:
select in interface MatchingStrategySelector
Returns:
most-appropriate strategy for matching given element, never null.
Throws:
InvalidTemplateException - when no compatible strategy exists for given element.


Copyright © 2007. All Rights Reserved.