Clover coverage report - JBind Project
Coverage timestamp: Fr Mai 28 2004 11:17:36 CEST
file stats: LOC: 53   Methods: 4
NCLOC: 35   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
BuiltInAtomicType.java 100% 70% 75% 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.Set;
 13   
 
 14   
 import org.jbind.xml.base.WhiteSpaceProcessing;
 15   
 import org.jbind.xml.core.cmp.IComponentVisitor;
 16   
 import org.jbind.xml.core.cmp.ISourceInfo;
 17   
 import org.jbind.xml.core.constraint.ConstraintType;
 18   
 import org.jbind.xml.core.constraint.IBuiltInConstraint;
 19   
 import org.jbind.xml.core.data.IDataCreator;
 20   
 import org.jbind.xml.core.type.IAnyType;
 21   
 import org.jbind.xml.core.type.IAtomicType;
 22   
 import org.jbind.xml.core.type.ISimpleType;
 23   
 import org.jbind.xml.msg.IConstraintViolations;
 24   
 import org.jbind.xml.msg.XmlException;
 25   
 
 26   
 public class BuiltInAtomicType extends BuiltInSimpleType implements IAtomicType {
 27   
 
 28   
   private Class mySimpleStorageType = null;
 29   
 
 30  123
   public BuiltInAtomicType(ISourceInfo aSourceInfo, String aName, IAnyType aBaseType, WhiteSpaceProcessing aWsp, IBuiltInConstraint aConstraint, ConstraintType.Checker aChecker, IDataCreator aDataCreator, Class aSimpleStorageType) {
 31  123
     super(aSourceInfo, aName, aBaseType, aChecker, aDataCreator);
 32  123
     getConstraints().setWhiteSpaceProcessing(aWsp);
 33  123
     if (null != aConstraint) {
 34  78
       getConstraints().setBuiltInConstraint(aConstraint);
 35   
     }
 36  123
     mySimpleStorageType = aSimpleStorageType;
 37   
   }
 38   
 
 39  97
   public ISimpleType createRestriction(ISourceInfo aSourceInfo, String aNamespace, String aName, String aRole, Set aFinalTypes, IConstraintViolations aViolations) {
 40  97
     return new RestrictedAtomicType(aSourceInfo, aNamespace, aName, aRole, aFinalTypes, aViolations);
 41   
   }
 42   
 
 43  2863
   public Class getSimpleStorageType() {
 44  2863
     return mySimpleStorageType;
 45   
   }
 46   
 
 47  0
   public final void accept(IComponentVisitor aVisitor) throws XmlException {
 48  0
     aVisitor.visitAtomicTypeStart(this);
 49  0
     visitSubComponents(aVisitor);
 50  0
     aVisitor.visitAtomicTypeEnd(this);
 51   
   }
 52   
 }
 53