Clover coverage report - Java Language Levels Test Coverage (javalanglevels-20120305-r5436)
Coverage timestamp: Sun Mar 4 2012 22:02:46 CST
file stats: LOC: 100   Methods: 9
NCLOC: 60   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
VoidReturn.java 28.6% 44.7% 33.3% 39.3%
coverage coverage
 1    package edu.rice.cs.javalanglevels.tree;
 2   
 3    import edu.rice.cs.javalanglevels.SourceInfo;
 4   
 5    /**
 6    * Class VoidReturn, 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 VoidReturn extends JExpression implements ReturnTypeI {
 11    private final String _name;
 12   
 13    /**
 14    * Constructs a VoidReturn.
 15    * @throws java.lang.IllegalArgumentException If any parameter to the constructor is null.
 16    */
 17  41 public VoidReturn(SourceInfo in_sourceInfo, String in_name) {
 18  41 super(in_sourceInfo);
 19   
 20  41 if (in_name == null) {
 21  0 throw new java.lang.IllegalArgumentException("Parameter 'name' to the VoidReturn constructor was null. This class may not have null field values.");
 22    }
 23  41 _name = ((in_name == null) ? null : in_name.intern());
 24    }
 25   
 26  58 final public String getName() { return _name; }
 27   
 28  0 public <RetType> RetType visit(JExpressionIFVisitor<RetType> visitor) { return visitor.forVoidReturn(this); }
 29  0 public void visit(JExpressionIFVisitor_void visitor) { visitor.forVoidReturn(this); }
 30   
 31    /**
 32    * Implementation of toString that uses
 33    * {@link #output} to generated nicely tabbed tree.
 34    */
 35  0 public java.lang.String toString() {
 36  0 java.io.StringWriter w = new java.io.StringWriter();
 37  0 output(w);
 38  0 return w.toString();
 39    }
 40   
 41    /**
 42    * Prints this object out as a nicely tabbed tree.
 43    */
 44  0 public void output(java.io.Writer writer) {
 45  0 outputHelp(new TabPrintWriter(writer, 2));
 46    }
 47   
 48  22 public void outputHelp(TabPrintWriter writer) {
 49  22 writer.print("VoidReturn" + ":");
 50  22 writer.indent();
 51   
 52  22 writer.startLine("");
 53  22 writer.print("sourceInfo = ");
 54  22 SourceInfo temp_sourceInfo = getSourceInfo();
 55  22 if (temp_sourceInfo == null) {
 56  0 writer.print("null");
 57    } else {
 58  22 writer.print(temp_sourceInfo);
 59    }
 60   
 61  22 writer.startLine("");
 62  22 writer.print("name = ");
 63  22 String temp_name = getName();
 64  22 if (temp_name == null) {
 65  0 writer.print("null");
 66    } else {
 67  22 writer.print(temp_name);
 68    }
 69  22 writer.unindent();
 70    }
 71   
 72    /**
 73    * Implementation of equals that is based on the values
 74    * of the fields of the object. Thus, two objects
 75    * created with identical parameters will be equal.
 76    */
 77  0 public boolean equals(java.lang.Object obj) {
 78  0 if (obj == null) return false;
 79  0 if ((obj.getClass() != this.getClass()) || (obj.hashCode() != this.hashCode())) {
 80  0 return false;
 81    } else {
 82  0 VoidReturn casted = (VoidReturn) obj;
 83  0 if (! (getName() == casted.getName())) return false;
 84  0 return true;
 85    }
 86    }
 87   
 88    /**
 89    * Implementation of hashCode that is consistent with
 90    * equals. The value of the hashCode is formed by
 91    * XORing the hashcode of the class object with
 92    * the hashcodes of all the fields of the object.
 93    */
 94  0 protected int generateHashCode() {
 95  0 int code = getClass().hashCode();
 96  0 code ^= 0;
 97  0 code ^= getName().hashCode();
 98  0 return code;
 99    }
 100    }