1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.asn1.ber.digester;
18
19
20
21
22 /***
23 * Document this class.
24 *
25 * @author <a href="mailto:dev@directory.apache.org">Apache Directory
26 * Project</a>
27 * @version $Rev: 157644 $
28 */
29 public class RuleRegistration
30 {
31 /*** the pattern that is used to register a rule with */
32 private final int[] pattern;
33 /*** the rule registered with the pattern */
34 private final Rule rule;
35
36
37 /***
38 * Create a new rule registration used to track the rules and patterns that
39 * are registered with the digester.
40 *
41 * @param pattern the pattern used to register a rule with
42 * @param rule the rule registered with the pattern
43 */
44 public RuleRegistration( int[] pattern, Rule rule )
45 {
46 this.rule = rule;
47 this.pattern = pattern;
48 }
49
50
51 /***
52 * Gets the pattern used to register a rule.
53 *
54 * @return the pattern that is used to register a rule
55 */
56 public int[] getPattern()
57 {
58 return pattern;
59 }
60
61
62 /***
63 * Gets the rule registered with the pattern.
64 *
65 * @return the rule registered with the pattern
66 */
67 public Rule getRule()
68 {
69 return rule;
70 }
71 }