Clover coverage report - JBind Project
Coverage timestamp: Fr Mai 28 2004 11:17:36 CEST
file stats: LOC: 52   Methods: 6
NCLOC: 34   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
BehaviourClassCartridge.java 50% 85,7% 100% 83,3%
 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.compiler;
 11   
 
 12   
 import org.jbind.xml.core.cmp.IBinding;
 13   
 import org.jbind.xml.core.cmp.IComponent;
 14   
 import org.jbind.xml.core.type.IAnyType;
 15   
 
 16   
 public class BehaviourClassCartridge extends BehaviourCartridge {
 17   
 
 18  3
   public BehaviourClassCartridge() {
 19  3
     super("behaviourClass", "", "");
 20   
   }
 21   
 
 22  4
   protected String getDeclaration(IAnyType aType) {
 23  4
     String stringPackage = getBinding(aType).getPackage();
 24  4
     String stringInterface = getBehaviourInterfaceCartridge().getNameForPackage(aType, stringPackage);
 25  4
     return new StringBuffer().append("public abstract class ").append(getInnerName(aType)).append(" extends ").append(behaviourBaseClass(((IAnyType)aType).getBaseType(), stringPackage)).append(" implements ").append(stringInterface).toString();
 26   
   }
 27   
 
 28  141
   public IBinding createBuiltInBinding(IComponent aComponent) {
 29  141
     return getDataClassCartridge().createBuiltInBinding(aComponent);
 30   
   }
 31   
 
 32  97
   public String getUsableFqName(IComponent aComponent) {
 33  97
     String res = super.getUsableFqName(aComponent);
 34  97
     if (null == res) {
 35  0
       res = getDataClassCartridge().getUsableFqName(aComponent);
 36   
     }
 37  97
     return res;
 38   
   }
 39   
 
 40  445
   public String getNameForPackage(IComponent aComponent, String aPackage) {
 41  445
     String res = super.getNameForPackage(aComponent, aPackage);
 42  445
     if (null == res) {
 43  0
       res = getDataClassCartridge().getNameForPackage(aComponent, aPackage);
 44   
     }
 45  445
     return res;
 46   
   }
 47   
 
 48  4
   public String interfaceOrClass() {
 49  4
     return "class";
 50   
   }
 51   
 }
 52