Class PatternRule
- java.lang.Object
-
- org.apache.commons.digester3.Rule
-
- org.apache.commons.digester3.xmlrules.PatternRule
-
- Direct Known Subclasses:
AbstractXmlRule
class PatternRule extends Rule
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringattributeNameprivate java.lang.Stringpatternprivate PatternStackpatternStack
-
Constructor Summary
Constructors Constructor Description PatternRule(java.lang.String attributeName, PatternStack patternStack)PatternRule(PatternStack patternStack)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbegin(java.lang.String namespace, java.lang.String name, org.xml.sax.Attributes attributes)This method is called when the beginning of a matching XML element is encountered.voidend(java.lang.String namespace, java.lang.String name)This method is called when the end of a matching XML element is encountered.protected java.lang.StringgetMatchingPattern()-
Methods inherited from class org.apache.commons.digester3.Rule
body, finish, getDigester, getNamespaceURI, setDigester, setNamespaceURI
-
-
-
-
Field Detail
-
attributeName
private final java.lang.String attributeName
-
patternStack
private final PatternStack patternStack
-
pattern
private java.lang.String pattern
-
-
Constructor Detail
-
PatternRule
public PatternRule(PatternStack patternStack)
-
PatternRule
public PatternRule(java.lang.String attributeName, PatternStack patternStack)
-
-
Method Detail
-
begin
public void begin(java.lang.String namespace, java.lang.String name, org.xml.sax.Attributes attributes) throws java.lang.ExceptionThis method is called when the beginning of a matching XML element is encountered.- Overrides:
beginin classRule- Parameters:
namespace- the namespace URI of the matching element, or an empty string if the parser is not namespace aware or the element has no namespacename- the local name if the parser is namespace aware, or just the element name otherwiseattributes- The attribute list of this element- Throws:
java.lang.Exception- if any error occurs
-
end
public void end(java.lang.String namespace, java.lang.String name) throws java.lang.ExceptionThis method is called when the end of a matching XML element is encountered.- Overrides:
endin classRule- Parameters:
namespace- the namespace URI of the matching element, or an empty string if the parser is not namespace aware or the element has no namespacename- the local name if the parser is namespace aware, or just the element name otherwise- Throws:
java.lang.Exception- if any error occurs
-
getMatchingPattern
protected java.lang.String getMatchingPattern()
- Returns:
-
-