1 package org.apache.commons.digester3.xmlrules;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import org.apache.commons.digester3.binder.LinkedRuleBuilder;
23 import org.apache.commons.digester3.binder.RulesBinder;
24 import org.xml.sax.Attributes;
25
26
27
28
29 abstract class AbstractXmlMethodRule
30 extends AbstractXmlRule
31 {
32
33 public AbstractXmlMethodRule( RulesBinder targetRulesBinder, PatternStack patternStack )
34 {
35 super( targetRulesBinder, patternStack );
36 }
37
38
39
40
41 @Override
42 protected final void bindRule( LinkedRuleBuilder linkedRuleBuilder, Attributes attributes )
43 throws Exception
44 {
45 String methodName = attributes.getValue( "methodname" );
46 String paramType = attributes.getValue( "paramtype" );
47 String exactMatch = attributes.getValue( "exactMatch" );
48 String fireOnBegin = attributes.getValue( "fireOnBegin" );
49
50 bindRule( linkedRuleBuilder, methodName, paramType, "true".equals( exactMatch ), "true".equals( fireOnBegin ) );
51 }
52
53
54
55
56 protected abstract void bindRule( LinkedRuleBuilder linkedRuleBuilder, String methodName, String paramType,
57 boolean exactMatch, boolean fireOnBegin );
58
59 }