Clover coverage report - DynamicJava Test Coverage (dynamicjava-20120303-r5436)
Coverage timestamp: Sat Mar 3 2012 03:02:19 CST
file stats: LOC: 72   Methods: 5
NCLOC: 21   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
Identifier.java - 66.7% 60% 63.6%
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    /** A stand-alone IdentifierToken. */
 32   
 33    public class Identifier implements IdentifierToken {
 34   
 35    private final String image;
 36    private final SourceInfo sourceInfo;
 37   
 38    /**
 39    * Creates a new token
 40    * @param im the image
 41    */
 42  258 public Identifier(String im) {
 43  258 this(im, SourceInfo.NONE);
 44    }
 45   
 46    /**
 47    * Creates a new token
 48    * @param im the image
 49    */
 50  258 public Identifier(String im, SourceInfo si) {
 51  258 image = im;
 52  258 sourceInfo = si;
 53    }
 54   
 55    /**
 56    * Returns the representation of the identifier
 57    */
 58  433 public String image() {
 59  433 return image;
 60    }
 61   
 62  0 public SourceInfo getSourceInfo() {
 63  0 return sourceInfo;
 64    }
 65   
 66    /**
 67    * Implementation of toString for use in unit testing
 68    */
 69  0 public String toString() {
 70  0 return "("+getClass().getName()+": "+image()+")";
 71    }
 72    }