org.apache.commons.digester.xmlrules

Class DigesterRuleParser.RulesPrefixAdapter

private class DigesterRuleParser.RulesPrefixAdapter extends 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.
Field Summary
Rulesdelegate
Stringprefix
Constructor Summary
RulesPrefixAdapter(String patternPrefix, Rules rules)
Method Summary
voidadd(String pattern, Rule rule)
Register a new Rule instance matching a pattern which is constructed by concatenating the pattern prefix with the given pattern.
voidclear()
This method passes through to the underlying Rules object.
DigestergetDigester()
This method passes through to the underlying Rules object.
StringgetNamespaceURI()
This method passes through to the underlying Rules object.
Listmatch(String pattern)
Listmatch(String namespaceURI, String pattern)
This method passes through to the underlying Rules object.
Listrules()
This method passes through to the underlying Rules object.
voidsetDigester(Digester digester)
This method passes through to the underlying Rules object.
voidsetNamespaceURI(String namespaceURI)
This method passes through to the underlying Rules object.

Field Detail

delegate

private Rules delegate

prefix

private String prefix

Constructor Detail

RulesPrefixAdapter

public RulesPrefixAdapter(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(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.

getNamespaceURI

public String getNamespaceURI()
This method passes through to the underlying Rules object.

match

public List match(String pattern)

Deprecated: Call match(namespaceURI,pattern) instead.

match

public List match(String namespaceURI, String pattern)
This method passes through to the underlying Rules object.

rules

public 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.

setNamespaceURI

public void setNamespaceURI(String namespaceURI)
This method passes through to the underlying Rules object.
Copyright 2001-2005 The Apache Software Foundation.