Clover coverage report - JBind Project
Coverage timestamp: Fr Mai 28 2004 11:17:36 CEST
file stats: LOC: 42   Methods: 5
NCLOC: 24   Classes: 2
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
XercesRegExFactory.java - 80% 80% 80%
 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.facade;
 11   
 
 12   
 import org.apache.regex.RegularExpression;
 13   
 import org.jbind.xml.core.bridge.IRegEx;
 14   
 import org.jbind.xml.core.bridge.IRegExFactory;
 15   
 
 16   
 public class XercesRegExFactory implements IRegExFactory {
 17   
 
 18  6
   public XercesRegExFactory() {}
 19   
 
 20  109
   public IRegEx createRegEx(String aRegEx) throws Exception {
 21  109
     return new RegEx(aRegEx);
 22   
   }
 23   
 
 24   
   private static class RegEx implements IRegEx {
 25   
 
 26   
     private String myString;
 27   
     private RegularExpression myRegularExpression;
 28   
 
 29  109
     public RegEx(String aString) throws Exception {
 30  109
       myString = aString;
 31  109
       myRegularExpression = new RegularExpression(aString, "X");
 32   
     }
 33  9801
     public boolean matches(String aString) {
 34  9801
       return myRegularExpression.matches(aString);
 35   
     }
 36  0
     public String asString() {
 37  0
       return myString;
 38   
     }
 39   
   }
 40   
 
 41   
 }
 42