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 java.util.HashSet;
23 import java.util.Set;
24
25 import org.apache.commons.digester3.binder.LinkedRuleBuilder;
26 import org.apache.commons.digester3.binder.RulesBinder;
27 import org.apache.commons.digester3.binder.RulesModule;
28
29
30
31
32 class WithMemoryRulesBinder
33 implements RulesBinder
34 {
35
36
37
38
39
40
41 private final PatternStack patternStack = new PatternStack();
42
43
44
45
46 private final Set<String> includedFiles = new HashSet<String>();
47
48 private final RulesBinder wrappedRulesBinder;
49
50 public WithMemoryRulesBinder( RulesBinder wrappedRulesBinder )
51 {
52 this.wrappedRulesBinder = wrappedRulesBinder;
53 }
54
55
56
57
58 public ClassLoader getContextClassLoader()
59 {
60 return this.wrappedRulesBinder.getContextClassLoader();
61 }
62
63
64
65
66 public void addError( String messagePattern, Object... arguments )
67 {
68 this.wrappedRulesBinder.addError( messagePattern, arguments );
69 }
70
71
72
73
74 public void addError( Throwable t )
75 {
76 this.wrappedRulesBinder.addError( t );
77 }
78
79
80
81
82 public void install( RulesModule rulesModule )
83 {
84 this.wrappedRulesBinder.install( rulesModule );
85 }
86
87
88
89
90 public LinkedRuleBuilder forPattern( String pattern )
91 {
92 return this.wrappedRulesBinder.forPattern( pattern );
93 }
94
95
96
97
98 public PatternStack getPatternStack()
99 {
100 return this.patternStack;
101 }
102
103
104
105
106 public Set<String> getIncludedFiles()
107 {
108 return this.includedFiles;
109 }
110
111 }