Coverage Report - org.apache.commons.betwixt.digester.CommonRuleSet

Classes in this File Line Coverage Branch Coverage Complexity
CommonRuleSet
100% 
N/A 
1

 1  
 /*
 2  
  * Copyright 2005 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  
 package org.apache.commons.betwixt.digester;
 17  
 
 18  
 import org.apache.commons.digester.Digester;
 19  
 import org.apache.commons.digester.RuleSetBase;
 20  
 
 21  
 /**
 22  
  * Rules common to both {@link org.apache.commons.betwixt.digester.MultiMappingBeanInfoDigester}
 23  
  * and {@link org.apache.commons.betwixt.digester.XMLBeanInfoDigester}.
 24  
  */
 25  1624
 public class CommonRuleSet extends RuleSetBase {
 26  
 
 27  
     public void addRuleInstances(Digester digester) {
 28  1624
         digester.addRule("*/element", new ElementRule());
 29  1624
         digester.addRule( "*/text", new TextRule() );
 30  1624
         digester.addRule("*/attribute", new AttributeRule());
 31  1624
         digester.addRule("*/hide", new HideRule());
 32  1624
         digester.addRule("*/addDefaults", new AddDefaultsRule());
 33  
         
 34  1624
         OptionRule optionRule = new OptionRule();
 35  1624
         digester.addRule( "*/option", optionRule );
 36  1624
         digester.addRule( "*/option/name", optionRule.getNameRule() );
 37  1624
         digester.addRule( "*/option/value", optionRule.getValueRule() );
 38  
 
 39  1624
     }
 40  
 
 41  
 }