Clover coverage report - Java Language Levels Test Coverage (javalanglevels-20120305-r5436)
Coverage timestamp: Sun Mar 4 2012 22:02:46 CST
file stats: LOC: 133   Methods: 9
NCLOC: 90   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
ComplexAnonymousClassInstantiation.java 4.2% 7.7% 33.3% 9.2%
coverage coverage
 1    package edu.rice.cs.javalanglevels.tree;
 2   
 3    import edu.rice.cs.javalanglevels.SourceInfo;
 4   
 5    /**
 6    * Class ComplexAnonymousClassInstantiation, 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 ComplexAnonymousClassInstantiation extends AnonymousClassInstantiation {
 11    private final Expression _enclosing;
 12   
 13    /**
 14    * Constructs a ComplexAnonymousClassInstantiation.
 15    * @throws java.lang.IllegalArgumentException If any parameter to the constructor is null.
 16    */
 17  6 public ComplexAnonymousClassInstantiation(SourceInfo in_sourceInfo, Expression in_enclosing, Type in_type, ParenthesizedExpressionList in_arguments, BracedBody in_body) {
 18  6 super(in_sourceInfo, in_type, in_arguments, in_body);
 19   
 20  6 if (in_enclosing == null) {
 21  0 throw new java.lang.IllegalArgumentException("Parameter 'enclosing' to the ComplexAnonymousClassInstantiation constructor was null. This class may not have null field values.");
 22    }
 23  6 _enclosing = in_enclosing;
 24    }
 25   
 26  21 final public Expression getEnclosing() { return _enclosing; }
 27   
 28  12 public <RetType> RetType visit(JExpressionIFVisitor<RetType> visitor) { return visitor.forComplexAnonymousClassInstantiation(this); }
 29  0 public void visit(JExpressionIFVisitor_void visitor) { visitor.forComplexAnonymousClassInstantiation(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  0 public void outputHelp(TabPrintWriter writer) {
 49  0 writer.print("ComplexAnonymousClassInstantiation" + ":");
 50  0 writer.indent();
 51   
 52  0 writer.startLine("");
 53  0 writer.print("sourceInfo = ");
 54  0 SourceInfo temp_sourceInfo = getSourceInfo();
 55  0 if (temp_sourceInfo == null) {
 56  0 writer.print("null");
 57    } else {
 58  0 writer.print(temp_sourceInfo);
 59    }
 60   
 61  0 writer.startLine("");
 62  0 writer.print("enclosing = ");
 63  0 Expression temp_enclosing = getEnclosing();
 64  0 if (temp_enclosing == null) {
 65  0 writer.print("null");
 66    } else {
 67  0 temp_enclosing.outputHelp(writer);
 68    }
 69   
 70  0 writer.startLine("");
 71  0 writer.print("type = ");
 72  0 Type temp_type = getType();
 73  0 if (temp_type == null) {
 74  0 writer.print("null");
 75    } else {
 76  0 temp_type.outputHelp(writer);
 77    }
 78   
 79  0 writer.startLine("");
 80  0 writer.print("arguments = ");
 81  0 ParenthesizedExpressionList temp_arguments = getArguments();
 82  0 if (temp_arguments == null) {
 83  0 writer.print("null");
 84    } else {
 85  0 temp_arguments.outputHelp(writer);
 86    }
 87   
 88  0 writer.startLine("");
 89  0 writer.print("body = ");
 90  0 BracedBody temp_body = getBody();
 91  0 if (temp_body == null) {
 92  0 writer.print("null");
 93    } else {
 94  0 temp_body.outputHelp(writer);
 95    }
 96  0 writer.unindent();
 97    }
 98   
 99    /**
 100    * Implementation of equals that is based on the values
 101    * of the fields of the object. Thus, two objects
 102    * created with identical parameters will be equal.
 103    */
 104  0 public boolean equals(java.lang.Object obj) {
 105  0 if (obj == null) return false;
 106  0 if ((obj.getClass() != this.getClass()) || (obj.hashCode() != this.hashCode())) {
 107  0 return false;
 108    } else {
 109  0 ComplexAnonymousClassInstantiation casted = (ComplexAnonymousClassInstantiation) obj;
 110  0 if (! (getEnclosing().equals(casted.getEnclosing()))) return false;
 111  0 if (! (getType().equals(casted.getType()))) return false;
 112  0 if (! (getArguments().equals(casted.getArguments()))) return false;
 113  0 if (! (getBody().equals(casted.getBody()))) return false;
 114  0 return true;
 115    }
 116    }
 117   
 118    /**
 119    * Implementation of hashCode that is consistent with
 120    * equals. The value of the hashCode is formed by
 121    * XORing the hashcode of the class object with
 122    * the hashcodes of all the fields of the object.
 123    */
 124  0 protected int generateHashCode() {
 125  0 int code = getClass().hashCode();
 126  0 code ^= 0;
 127  0 code ^= getEnclosing().hashCode();
 128  0 code ^= getType().hashCode();
 129  0 code ^= getArguments().hashCode();
 130  0 code ^= getBody().hashCode();
 131  0 return code;
 132    }
 133    }