Clover coverage report - DynamicJava Test Coverage (dynamicjava-20120303-r5436)
Coverage timestamp: Sat Mar 3 2012 03:02:19 CST
file stats: LOC: 79   Methods: 4
NCLOC: 20   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
UnaryExpression.java 50% 77.8% 100% 76.5%
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    /**
 32    * This class represents the unary expression nodes of the syntax tree
 33    *
 34    * @author Stephane Hillion
 35    * @version 1.0 - 1999/04/25
 36    */
 37   
 38    public abstract class UnaryExpression extends Expression implements ExpressionContainer {
 39    /**
 40    * The target expression
 41    */
 42    private Expression expression;
 43   
 44    /**
 45    * Initializes the expression
 46    * @param exp the target expression
 47    * @exception IllegalArgumentException if exp is null
 48    */
 49  567 protected UnaryExpression(Expression exp,
 50    SourceInfo si) {
 51  567 super(si);
 52   
 53  0 if (exp == null) throw new IllegalArgumentException("exp == null");
 54   
 55  567 expression = exp;
 56    }
 57   
 58    /**
 59    * Returns the target expression
 60    */
 61  1145 public Expression getExpression() {
 62  1145 return expression;
 63    }
 64   
 65    /**
 66    * Sets the target expression
 67    * @exception IllegalArgumentException if e is null
 68    */
 69  217 public void setExpression(Expression e) {
 70  0 if (e == null) throw new IllegalArgumentException("e == null");
 71  217 expression = e;
 72    }
 73    /**
 74    * Implementation of toString for use in unit testing
 75    */
 76  14 public String toString() {
 77  14 return "("+getClass().getName()+": "+getExpression()+")";
 78    }
 79    }