Clover coverage report - JBind Project
Coverage timestamp: Fr Mai 28 2004 11:17:36 CEST
file stats: LOC: 59   Methods: 3
NCLOC: 43   Classes: 1
This license of Clover is provided to support the development of JBind only. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover.
 
 Source file Conditionals Statements Methods TOTAL
OpenAttributes.java 90,9% 89,3% 66,7% 88,7%
 1   
 /*
 2   
  * JBind
 3   
  *
 4   
  * Copyright (c) by Stefan Wachter. All rights reserved.
 5   
  *
 6   
  * Usage, modification, and redistribution is subject to license terms that are
 7   
  * available at 'http://www.jbind.org'. The JBind license is like the
 8   
  * 'Apache Software License V 1.1'.
 9   
  */
 10   
 package org.jbind.xml.schema.element;
 11   
 
 12   
 import org.jbind.xml.base.IAttribute;
 13   
 import org.jbind.xml.base.IBindingAttributes;
 14   
 import org.jbind.xml.base.INamespaces;
 15   
 import org.jbind.xml.msg.XmlException;
 16   
 
 17   
 public abstract class OpenAttributes extends Element implements IOpenAttributes {
 18   
 
 19  5683
   public OpenAttributes(CreationParams aCreationParams) {
 20  5683
     super(aCreationParams);
 21   
   }
 22   
 
 23  0
   public String getAttributeString(String aNamespace, String aName) {
 24  0
     return getAttributes().getStringValue(aNamespace, aName);
 25   
   }
 26   
 
 27  186
   protected IAttribute doCreateAttribute(ACParams anACParams) throws XmlException {
 28  186
     IAttribute res = null;
 29  186
     String upan = NameUtil.getBindingAttributeName(anACParams);
 30  186
     if (IBindingAttributes.GETTER.equals(upan)) {
 31  2
       res = new Attribute(anACParams);
 32  184
     } else if (IBindingAttributes.SETTER.equals(upan)) {
 33  49
       res = new Attribute(anACParams);
 34  135
     } else if (IBindingAttributes.CREATOR.equals(upan)) {
 35  2
       res = new Attribute(anACParams);
 36  133
     } else if (IBindingAttributes.CREATOR_WITH_TYPE.equals(upan)) {
 37  12
       res = new Attribute(anACParams);
 38  121
     } else if (IBindingAttributes.CHECKER.equals(upan)) {
 39  59
       res = new Attribute(anACParams);
 40  62
     } else if (IBindingAttributes.REMOVER.equals(upan)) {
 41  24
       res = new Attribute(anACParams);
 42  38
     } else if (IBindingAttributes.ITERATOR.equals(upan)) {
 43  2
       res = new Attribute(anACParams);
 44  36
     } else if (IBindingAttributes.REFERENCE_ITERATOR.equals(upan)) {
 45  0
       res = new Attribute(anACParams);
 46  36
     } else if (IBindingAttributes.REFERENCE_GETTER.equals(upan)) {
 47  0
       res = new Attribute(anACParams);
 48  36
     } else if (IBindingAttributes.USE_DATA_CLASS.equals(upan)) {
 49  12
       res = new BooleanAttribute(anACParams);
 50  24
     } else if (!INamespaces.NO.equals(anACParams.namespace) && !INamespaces.JBIND.equals(anACParams.namespace)) {
 51  23
       res = new Attribute(anACParams);
 52   
     } else {
 53  1
       res = super.doCreateAttribute(anACParams);
 54   
     }
 55  186
     return res;
 56   
   }
 57   
 
 58   
 }
 59