org.apache.commons.digester.xmlrules

Class DigesterRuleParser.PatternRule

Enclosing Class:
DigesterRuleParser

private class DigesterRuleParser.PatternRule
extends Rule

A rule for extracting the pattern matching strings from the rules XML. In the digester-rules document type, a pattern can either be declared in the 'value' attribute of a element (in which case the pattern applies to all rules elements contained within the element), or it can be declared in the optional 'pattern' attribute of a rule element.

Field Summary

private String
attrName
private String
pattern

Fields inherited from class org.apache.commons.digester.Rule

digester, namespaceURI

Constructor Summary

PatternRule(String attrName)

Method Summary

void
begin(Attributes attributes)
If a pattern is defined for the attribute, push it onto the pattern stack.
void
end()
If there was a pattern for this element, pop it off the pattern stack.

Methods inherited from class org.apache.commons.digester.Rule

begin, begin, body, body, end, end, finish, getDigester, getNamespaceURI, setDigester, setNamespaceURI

Field Details

attrName

private String attrName

pattern

private String pattern

Constructor Details

PatternRule

public PatternRule(String attrName)
Parameters:
attrName - The name of the attribute containing the pattern

Method Details

begin

public void begin(Attributes attributes)
If a pattern is defined for the attribute, push it onto the pattern stack.
Overrides:
begin in interface Rule

end

public void end()
If there was a pattern for this element, pop it off the pattern stack.
Overrides:
end in interface Rule

Copyright 2001-2005 The Apache Software Foundation.