Clover coverage report - JBind Project
Coverage timestamp: Fr Mai 28 2004 11:17:36 CEST
file stats: LOC: 58   Methods: 7
NCLOC: 37   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
RestrictedUnionType.java - 77,8% 71,4% 75%
 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.cmp;
 11   
 
 12   
 import java.util.Iterator;
 13   
 import java.util.Set;
 14   
 
 15   
 import org.jbind.xml.core.bridge.IDataImpl;
 16   
 import org.jbind.xml.core.cmp.IComponentVisitor;
 17   
 import org.jbind.xml.core.cmp.ISourceInfo;
 18   
 import org.jbind.xml.core.constraint.ICheckContext;
 19   
 import org.jbind.xml.core.data.IAnyTypeData;
 20   
 import org.jbind.xml.core.type.IAnyType;
 21   
 import org.jbind.xml.core.type.IUnionType;
 22   
 import org.jbind.xml.msg.IConstraintViolations;
 23   
 import org.jbind.xml.msg.XmlException;
 24   
 
 25   
 public class RestrictedUnionType extends RestrictedSimpleType implements IUnionType {
 26   
 
 27  6
   public RestrictedUnionType(ISourceInfo aSourceInfo, String aNamespace, String aName, String aRole, Set aFinalTypes, IConstraintViolations aViolations) {
 28  6
     super(aSourceInfo, aNamespace, aName, aRole, aFinalTypes, aViolations);
 29   
   }
 30   
 
 31  12
   public void accept(IComponentVisitor aVisitor) throws XmlException {
 32  12
     aVisitor.visitUnionTypeStart(this);
 33  12
     visitSubComponents(aVisitor);
 34  12
     aVisitor.visitUnionTypeEnd(this);
 35   
   }
 36   
 
 37  0
   public Iterator iterMemberTypes() {
 38  0
     return ((IUnionType)getBaseType()).iterMemberTypes();
 39   
   }
 40   
 
 41  8
   public final IAnyType getInstanceType() {
 42  8
     return getBaseType().getInstanceType();
 43   
   }
 44   
 
 45  15
   protected IAnyTypeData doCreateEmptyData(IDataImpl anImpl) throws XmlException {
 46  15
     return getBaseType().createEmptyData(anImpl);
 47   
   }
 48   
 
 49  0
   protected boolean isUnion() {
 50  0
     return true;
 51   
   }
 52   
 
 53  15
   public void checkEnclosedConstraints(ICheckContext aContext) {
 54  15
     getBaseType().checkEnclosedConstraints(aContext);
 55   
   }
 56   
 
 57   
 }
 58