Clover coverage report - JBind Project
Coverage timestamp: Fr Mai 28 2004 11:17:36 CEST
file stats: LOC: 50   Methods: 4
NCLOC: 31   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
InnerBinding.java 50% 100% 100% 90,5%
 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.base.StringUtil;
 13   
 import org.jbind.xml.core.cmp.IBinding;
 14   
 import org.jbind.xml.core.cmp.IComponent;
 15   
 
 16   
 public class InnerBinding extends Binding {
 17   
 
 18   
   private IBinding myParentBinding;
 19   
   private String myName;
 20   
 
 21  470
   public InnerBinding(IBinding aParentBinding, ICartridge aCartridge, IComponent aComponent, String aBindingName) {
 22  470
     myParentBinding = aParentBinding;
 23   
 
 24  470
     myName = StringUtil.firstUpper(aBindingName);
 25  470
     String prefix = aCartridge.getNamePrefix(aComponent);
 26  470
     if (null != prefix) {
 27  470
       myName = prefix + myName;
 28   
     }
 29  470
     String suffix = aCartridge.getNameSuffix(aComponent);
 30  470
     if (null != suffix) {
 31  470
       myName = myName + suffix;
 32   
     }
 33  470
     myName = StringUtil.toJavaIdentifier(myName);
 34   
   }
 35   
 
 36  7420
   public String getName(char aSeparator) {
 37  7420
     String parentName = myParentBinding.getName(aSeparator);
 38  7420
     return (null != parentName) ? parentName + aSeparator + myName : myName;
 39   
   }
 40   
 
 41  477
   public String getInnerName() {
 42  477
     return myName;
 43   
   }
 44   
 
 45  7982
   public String getPackage() {
 46  7982
     return myParentBinding.getPackage();
 47   
   }
 48   
 
 49   
 }
 50