Clover coverage report - JBind Project
Coverage timestamp: Fr Mai 28 2004 11:17:36 CEST
file stats: LOC: 32   Methods: 2
NCLOC: 16   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
DigitsFacet.java - 100% 100% 100%
 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.core.constraint.ConstraintType;
 13   
 import org.jbind.xml.core.constraint.IConstraints;
 14   
 import org.jbind.xml.core.type.IAnyType;
 15   
 import org.jbind.xml.msg.IConstraintViolations;
 16   
 import org.jbind.xml.msg.XmlException;
 17   
 
 18   
 public class DigitsFacet extends Facet {
 19   
 
 20   
   private boolean myTotalNotFraction;
 21   
 
 22  2
   public DigitsFacet(CreationParams aCreationParams, ConstraintType.Digits aConstraintType) {
 23  2
     super(aCreationParams, aConstraintType);
 24   
   }
 25   
 
 26  2
   public void doAddConstraint(IAnyType aType, IConstraints aConstraints, IConstraintViolations aViolations) throws XmlException {
 27  2
     int nbDigits = getIntValue();
 28  2
     aConstraints.add(((ConstraintType.Digits)getConstraintType()).createConstraint(nbDigits), aViolations, this);
 29   
   }
 30   
 
 31   
 }
 32