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
BehaviourInterfaceCartridge.java 75% 92,9% 100% 91,7%
 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 BehaviourInterfaceCartridge extends BehaviourCartridge {
 17   
 
 18  3
   public BehaviourInterfaceCartridge() {
 19  3
     super("behaviourInterface", "I", "");
 20   
   }
 21   
 
 22  4
   protected String getDeclaration(IAnyType aType) {
 23  4
     String stringPackage = getBinding(aType).getPackage();
 24  4
     String stringInterface = getDataInterfaceCartridge().getNameForPackage(aType, stringPackage);
 25  4
     return new StringBuffer().append("public interface ").append(getInnerName(aType)).append(" ").append("extends ").append(stringInterface).toString();
 26   
   }
 27   
 
 28  141
   public IBinding createBuiltInBinding(IComponent aComponent) {
 29  141
     return getDataInterfaceCartridge().createBuiltInBinding(aComponent);
 30   
   }
 31   
 
 32  3277
   public String getUsableFqName(IComponent aComponent) {
 33  3277
     String res = super.getUsableFqName(aComponent);
 34  3277
     if (null == res) {
 35  2055
       res = getDataInterfaceCartridge().getUsableFqName(aComponent);
 36   
     }
 37  3277
     return res;
 38   
   }
 39   
 
 40  8
   public String getNameForPackage(IComponent aComponent, String aPackage) {
 41  8
     String res = super.getNameForPackage(aComponent, aPackage);
 42  8
     if (null == res) {
 43  0
       res = getDataInterfaceCartridge().getNameForPackage(aComponent, aPackage);
 44   
     }
 45  8
     return res;
 46   
   }
 47   
 
 48  8
   public String interfaceOrClass() {
 49  8
     return "interface";
 50   
   }
 51   
 }
 52