View Javadoc

1   /*
2    *   Copyright 2004 The Apache Software Foundation
3    *
4    *   Licensed under the Apache License, Version 2.0 (the "License");
5    *   you may not use this file except in compliance with the License.
6    *   You may obtain a copy of the License at
7    *
8    *       http://www.apache.org/licenses/LICENSE-2.0
9    *
10   *   Unless required by applicable law or agreed to in writing, software
11   *   distributed under the License is distributed on an "AS IS" BASIS,
12   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *   See the License for the specific language governing permissions and
14   *   limitations under the License.
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  }