Clover coverage report - Java Language Levels Test Coverage (javalanglevels-20120305-r5436)
Coverage timestamp: Sun Mar 4 2012 22:02:46 CST
file stats: LOC: 92   Methods: 9
NCLOC: 53   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
DoubleLiteral.java 12.5% 47.1% 44.4% 41.2%
coverage coverage
 1    package edu.rice.cs.javalanglevels.tree;
 2   
 3    import edu.rice.cs.javalanglevels.SourceInfo;
 4   
 5    /**
 6    * Class DoubleLiteral, a component of the JExpressionIF composite hierarchy.
 7    * Note: null is not allowed as a value for any field.
 8    * @version Generated automatically by ASTGen at Sun Mar 04 22:01:28 CST 2012
 9    */
 10    public class DoubleLiteral extends LexicalLiteral {
 11    private final double _value;
 12   
 13    /**
 14    * Constructs a DoubleLiteral.
 15    * @throws java.lang.IllegalArgumentException If any parameter to the constructor is null.
 16    */
 17  20 public DoubleLiteral(SourceInfo in_sourceInfo, double in_value) {
 18  20 super(in_sourceInfo);
 19  20 _value = in_value;
 20    }
 21   
 22  2 final public double getValue() { return _value; }
 23   
 24  22 public <RetType> RetType visit(JExpressionIFVisitor<RetType> visitor) { return visitor.forDoubleLiteral(this); }
 25  0 public void visit(JExpressionIFVisitor_void visitor) { visitor.forDoubleLiteral(this); }
 26   
 27    /**
 28    * Implementation of toString that uses
 29    * {@link #output} to generated nicely tabbed tree.
 30    */
 31  0 public java.lang.String toString() {
 32  0 java.io.StringWriter w = new java.io.StringWriter();
 33  0 output(w);
 34  0 return w.toString();
 35    }
 36   
 37    /**
 38    * Prints this object out as a nicely tabbed tree.
 39    */
 40  0 public void output(java.io.Writer writer) {
 41  0 outputHelp(new TabPrintWriter(writer, 2));
 42    }
 43   
 44  2 public void outputHelp(TabPrintWriter writer) {
 45  2 writer.print("DoubleLiteral" + ":");
 46  2 writer.indent();
 47   
 48  2 writer.startLine("");
 49  2 writer.print("sourceInfo = ");
 50  2 SourceInfo temp_sourceInfo = getSourceInfo();
 51  2 if (temp_sourceInfo == null) {
 52  0 writer.print("null");
 53    } else {
 54  2 writer.print(temp_sourceInfo);
 55    }
 56   
 57  2 writer.startLine("");
 58  2 writer.print("value = ");
 59  2 double temp_value = getValue();
 60  2 writer.print(temp_value);
 61  2 writer.unindent();
 62    }
 63   
 64    /**
 65    * Implementation of equals that is based on the values
 66    * of the fields of the object. Thus, two objects
 67    * created with identical parameters will be equal.
 68    */
 69  0 public boolean equals(java.lang.Object obj) {
 70  0 if (obj == null) return false;
 71  0 if ((obj.getClass() != this.getClass()) || (obj.hashCode() != this.hashCode())) {
 72  0 return false;
 73    } else {
 74  0 DoubleLiteral casted = (DoubleLiteral) obj;
 75  0 if (! (getValue() == casted.getValue())) return false;
 76  0 return true;
 77    }
 78    }
 79   
 80    /**
 81    * Implementation of hashCode that is consistent with
 82    * equals. The value of the hashCode is formed by
 83    * XORing the hashcode of the class object with
 84    * the hashcodes of all the fields of the object.
 85    */
 86  0 protected int generateHashCode() {
 87  0 int code = getClass().hashCode();
 88  0 code ^= 0;
 89  0 code ^= ((int) (java.lang.Double.doubleToLongBits(getValue())^(java.lang.Double.doubleToLongBits(getValue())>>>32)));
 90  0 return code;
 91    }
 92    }