Coverage Report - javax.faces.internal.IgnoreAttribute
 
Classes in this File Line Coverage Branch Coverage Complexity
IgnoreAttribute
91%
30/33
N/A
1
 
 1  
 /*
 2  
  * Copyright 2004-2011 the Seasar Foundation and the Others.
 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,
 13  
  * either express or implied. See the License for the specific language
 14  
  * governing permissions and limitations under the License.
 15  
  */
 16  
 package javax.faces.internal;
 17  
 
 18  
 import java.util.ArrayList;
 19  
 import java.util.List;
 20  
 
 21  
 import org.seasar.framework.util.AssertionUtil;
 22  
 
 23  
 /**
 24  
  * @author shot
 25  
  * @author manhole
 26  
  */
 27  
 public class IgnoreAttribute {
 28  
 
 29  1094
     private final List names = new ArrayList();
 30  
 
 31  1094
     public IgnoreAttribute() {
 32  1094
         setupDefaultIgnores();
 33  1094
     }
 34  
 
 35  
     public Object[] getAttributeNames() {
 36  433
         return names.toArray();
 37  
     }
 38  
 
 39  
     public void addAttributeName(final String name) {
 40  30222
         AssertionUtil.assertNotNull("name", name);
 41  30222
         names.add(name);
 42  30222
     }
 43  
 
 44  
     public void clear() {
 45  0
         names.clear();
 46  0
         setupDefaultIgnores();
 47  0
     }
 48  
 
 49  
     protected void setupDefaultIgnores() {
 50  1094
         addAttributeName("attributes");
 51  1094
         addAttributeName("actionListeners");
 52  1094
         addAttributeName("children");
 53  1094
         addAttributeName("childCount");
 54  1094
         addAttributeName("converter");
 55  1094
         addAttributeName("facets");
 56  1094
         addAttributeName("facetsAndChildren");
 57  1094
         addAttributeName("family");
 58  1094
         addAttributeName("localValue");
 59  1094
         addAttributeName("localValueSet");
 60  1094
         addAttributeName("parent");
 61  1094
         addAttributeName("submittedValue");
 62  1094
         addAttributeName("transient");
 63  1094
         addAttributeName("rendered");
 64  1094
         addAttributeName("rendererType");
 65  1094
         addAttributeName("rendersChildren");
 66  1094
         addAttributeName("valid");
 67  1094
         addAttributeName("validator");
 68  1094
         addAttributeName("validators");
 69  1094
         addAttributeName("valueChangeListener");
 70  1094
         addAttributeName("valueChangeListeners");
 71  1094
     }
 72  
 
 73  
 }