Clover coverage report - DynamicJava Test Coverage (dynamicjava-20120303-r5436)
Coverage timestamp: Sat Mar 3 2012 03:02:19 CST
file stats: LOC: 66   Methods: 2
NCLOC: 19   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
TreeUtilities.java 66.7% 100% 50% 81.2%
coverage coverage
 1    /*
 2    * DynamicJava - Copyright (C) 1999-2001
 3    *
 4    * Permission is hereby granted, free of charge, to any person obtaining a
 5    * copy of this software and associated documentation files
 6    * (the "Software"), to deal in the Software without restriction, including
 7    * without limitation the rights to use, copy, modify, merge, publish,
 8    * distribute, sublicense, and/or sell copies of the Software, and to permit
 9    * persons to whom the Software is furnished to do so, subject to the
 10    * following conditions:
 11    * The above copyright notice and this permission notice shall be included
 12    * in all copies or substantial portions of the Software.
 13    *
 14    * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 15    * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 16    * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 17    * IN NO EVENT SHALL DYADE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 18    * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 19    * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 20    * DEALINGS IN THE SOFTWARE.
 21    *
 22    * Except as contained in this notice, the name of Dyade shall not be
 23    * used in advertising or otherwise to promote the sale, use or other
 24    * dealings in this Software without prior written authorization from
 25    * Dyade.
 26    *
 27    */
 28   
 29    package koala.dynamicjava.tree;
 30   
 31    import java.util.*;
 32   
 33    /**
 34    * This class contains a collection of utility methods for trees.
 35    *
 36    * @author Stephane Hillion
 37    * @version 1.0 - 1999/06/27
 38    */
 39   
 40    public class TreeUtilities {
 41    /**
 42    * Transforms a list of token into a dot-separated name
 43    * @param l a list of token. l can be null.
 44    * @return "" if l is null.
 45    */
 46  3804 public static String listToName(List<? extends IdentifierToken> l) {
 47  3804 String result = "";
 48  3804 if (l != null) {
 49  3804 Iterator<? extends IdentifierToken> it = l.iterator();
 50  3804 if (it.hasNext()) {
 51  3804 result += it.next().image();
 52    }
 53  3804 while (it.hasNext()) {
 54  580 result += "." + it.next().image();
 55    }
 56    }
 57  3804 return result;
 58    }
 59   
 60    /**
 61    * This class contains only static methods, so it is not useful
 62    * to create instances of it or to extend it.
 63    */
 64  0 private TreeUtilities() {
 65    }
 66    }