Clover coverage report - JBind Project
Coverage timestamp: Fr Mai 28 2004 11:17:36 CEST
file stats: LOC: 35   Methods: 2
NCLOC: 20   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
TypeIdentityConstraintElement.java 50% 85,7% 100% 81,8%
 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.ISymbolspaces;
 15   
 import org.jbind.xml.msg.XmlException;
 16   
 
 17   
 public abstract class TypeIdentityConstraintElement extends IdentityConstraintElement {
 18   
 
 19  16
   public TypeIdentityConstraintElement(CreationParams aCreationParams) {
 20  16
     super(aCreationParams, false);
 21   
   }
 22   
 
 23  16
   protected IAttribute doCreateAttribute(ACParams anACParams) throws XmlException {
 24  16
     IAttribute res = null;
 25  16
     String upan = NameUtil.getBindingAttributeName(anACParams);
 26  16
     if (IBindingAttributes.REFERENCED_TYPE.equals(upan)) {
 27  0
       res = new RefAttribute(anACParams, ISymbolspaces.TYPE);
 28   
     } else {
 29  16
       res = super.doCreateAttribute(anACParams);
 30   
     }
 31  16
     return res;
 32   
   }
 33   
 
 34   
 }
 35