Class DigesterRuleParser.RulesPrefixAdapter
- java.lang.Object
-
- org.apache.commons.digester.xmlrules.DigesterRuleParser.RulesPrefixAdapter
-
- All Implemented Interfaces:
Rules
- Enclosing class:
- DigesterRuleParser
private class DigesterRuleParser.RulesPrefixAdapter extends java.lang.Object implements Rules
Wraps a Rules object. Delegates all the Rules interface methods to the underlying Rules object. Overrides the add method to prepend a prefix to the pattern string.
-
-
Constructor Summary
Constructors Constructor Description RulesPrefixAdapter(java.lang.String patternPrefix, Rules rules)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
add(java.lang.String pattern, Rule rule)
Register a new Rule instance matching a pattern which is constructed by concatenating the pattern prefix with the given pattern.void
clear()
This method passes through to the underlying Rules object.Digester
getDigester()
This method passes through to the underlying Rules object.java.lang.String
getNamespaceURI()
This method passes through to the underlying Rules object.java.util.List
match(java.lang.String pattern)
Deprecated.Call match(namespaceURI,pattern) instead.java.util.List
match(java.lang.String namespaceURI, java.lang.String pattern)
This method passes through to the underlying Rules object.java.util.List
rules()
This method passes through to the underlying Rules object.void
setDigester(Digester digester)
This method passes through to the underlying Rules object.void
setNamespaceURI(java.lang.String namespaceURI)
This method passes through to the underlying Rules object.
-
-
-
Field Detail
-
delegate
private Rules delegate
-
prefix
private java.lang.String prefix
-
-
Constructor Detail
-
RulesPrefixAdapter
public RulesPrefixAdapter(java.lang.String patternPrefix, Rules rules)
- Parameters:
patternPrefix
- the pattern string to prepend to the pattern passed to the add method.rules
- The wrapped Rules object. All of this class's methods pass through to this object.
-
-
Method Detail
-
add
public void add(java.lang.String pattern, Rule rule)
Register a new Rule instance matching a pattern which is constructed by concatenating the pattern prefix with the given pattern.
-
clear
public void clear()
This method passes through to the underlying Rules object.
-
getDigester
public Digester getDigester()
This method passes through to the underlying Rules object.- Specified by:
getDigester
in interfaceRules
-
getNamespaceURI
public java.lang.String getNamespaceURI()
This method passes through to the underlying Rules object.- Specified by:
getNamespaceURI
in interfaceRules
-
match
public java.util.List match(java.lang.String pattern)
Deprecated.Call match(namespaceURI,pattern) instead.Description copied from interface:Rules
Return a List of all registered Rule instances that match the specified nesting pattern, or a zero-length List if there are no matches. If more than one Rule instance matches, they must be returned in the order originally registered through theadd()
method.
-
match
public java.util.List match(java.lang.String namespaceURI, java.lang.String pattern)
This method passes through to the underlying Rules object.
-
rules
public java.util.List rules()
This method passes through to the underlying Rules object.
-
setDigester
public void setDigester(Digester digester)
This method passes through to the underlying Rules object.- Specified by:
setDigester
in interfaceRules
- Parameters:
digester
- The newly associated Digester instance
-
setNamespaceURI
public void setNamespaceURI(java.lang.String namespaceURI)
This method passes through to the underlying Rules object.- Specified by:
setNamespaceURI
in interfaceRules
- Parameters:
namespaceURI
- Namespace URI that must match on all subsequently added rules, ornull
for matching regardless of the current namespace URI
-
-