Clover coverage report - Java Language Levels Test Coverage (javalanglevels-20120305-r5436)
Coverage timestamp: Sun Mar 4 2012 22:02:46 CST
file stats: LOC: 170   Methods: 8
NCLOC: 126   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
InnerClassDef.java 24% 49.5% 37.5% 41%
coverage coverage
 1    package edu.rice.cs.javalanglevels.tree;
 2   
 3    import edu.rice.cs.javalanglevels.SourceInfo;
 4   
 5    /**
 6    * Class InnerClassDef, 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 InnerClassDef extends ClassDef implements BodyItemI {
 11   
 12    /**
 13    * Constructs a InnerClassDef.
 14    * @throws java.lang.IllegalArgumentException If any parameter to the constructor is null.
 15    */
 16  39 public InnerClassDef(SourceInfo in_sourceInfo, ModifiersAndVisibility in_mav, Word in_name, TypeParameter[] in_typeParameters, ReferenceType in_superclass, ReferenceType[] in_interfaces, BracedBody in_body) {
 17  39 super(in_sourceInfo, in_mav, in_name, in_typeParameters, in_superclass, in_interfaces, in_body);
 18    }
 19   
 20   
 21  35 public <RetType> RetType visit(JExpressionIFVisitor<RetType> visitor) { return visitor.forInnerClassDef(this); }
 22  0 public void visit(JExpressionIFVisitor_void visitor) { visitor.forInnerClassDef(this); }
 23   
 24    /**
 25    * Implementation of toString that uses
 26    * {@link #output} to generated nicely tabbed tree.
 27    */
 28  0 public java.lang.String toString() {
 29  0 java.io.StringWriter w = new java.io.StringWriter();
 30  0 output(w);
 31  0 return w.toString();
 32    }
 33   
 34    /**
 35    * Prints this object out as a nicely tabbed tree.
 36    */
 37  0 public void output(java.io.Writer writer) {
 38  0 outputHelp(new TabPrintWriter(writer, 2));
 39    }
 40   
 41  12 public void outputHelp(TabPrintWriter writer) {
 42  12 writer.print("InnerClassDef" + ":");
 43  12 writer.indent();
 44   
 45  12 writer.startLine("");
 46  12 writer.print("sourceInfo = ");
 47  12 SourceInfo temp_sourceInfo = getSourceInfo();
 48  12 if (temp_sourceInfo == null) {
 49  0 writer.print("null");
 50    } else {
 51  12 writer.print(temp_sourceInfo);
 52    }
 53   
 54  12 writer.startLine("");
 55  12 writer.print("mav = ");
 56  12 ModifiersAndVisibility temp_mav = getMav();
 57  12 if (temp_mav == null) {
 58  0 writer.print("null");
 59    } else {
 60  12 temp_mav.outputHelp(writer);
 61    }
 62   
 63  12 writer.startLine("");
 64  12 writer.print("name = ");
 65  12 Word temp_name = getName();
 66  12 if (temp_name == null) {
 67  0 writer.print("null");
 68    } else {
 69  12 temp_name.outputHelp(writer);
 70    }
 71   
 72  12 writer.startLine("");
 73  12 writer.print("typeParameters = ");
 74  12 writer.print("{");
 75  12 writer.indent();
 76  12 for (int i = 0; i < getTypeParameters().length; i++) {
 77  0 TypeParameter temp_typeParameters = getTypeParameters()[i];
 78  0 writer.startLine("#" + i + ": ");
 79  0 if (temp_typeParameters == null) {
 80  0 writer.print("null");
 81    } else {
 82  0 temp_typeParameters.outputHelp(writer);
 83    }
 84    }
 85  12 writer.unindent();
 86  12 if (getTypeParameters().length > 0) {
 87  0 writer.startLine("");
 88    }
 89  12 writer.print("}");
 90   
 91  12 writer.startLine("");
 92  12 writer.print("superclass = ");
 93  12 ReferenceType temp_superclass = getSuperclass();
 94  12 if (temp_superclass == null) {
 95  0 writer.print("null");
 96    } else {
 97  12 temp_superclass.outputHelp(writer);
 98    }
 99   
 100  12 writer.startLine("");
 101  12 writer.print("interfaces = ");
 102  12 writer.print("{");
 103  12 writer.indent();
 104  12 for (int i = 0; i < getInterfaces().length; i++) {
 105  4 ReferenceType temp_interfaces = getInterfaces()[i];
 106  4 writer.startLine("#" + i + ": ");
 107  4 if (temp_interfaces == null) {
 108  0 writer.print("null");
 109    } else {
 110  4 temp_interfaces.outputHelp(writer);
 111    }
 112    }
 113  12 writer.unindent();
 114  12 if (getInterfaces().length > 0) {
 115  2 writer.startLine("");
 116    }
 117  12 writer.print("}");
 118   
 119  12 writer.startLine("");
 120  12 writer.print("body = ");
 121  12 BracedBody temp_body = getBody();
 122  12 if (temp_body == null) {
 123  0 writer.print("null");
 124    } else {
 125  12 temp_body.outputHelp(writer);
 126    }
 127  12 writer.unindent();
 128    }
 129   
 130    /**
 131    * Implementation of equals that is based on the values
 132    * of the fields of the object. Thus, two objects
 133    * created with identical parameters will be equal.
 134    */
 135  0 public boolean equals(java.lang.Object obj) {
 136  0 if (obj == null) return false;
 137  0 if ((obj.getClass() != this.getClass()) || (obj.hashCode() != this.hashCode())) {
 138  0 return false;
 139    } else {
 140  0 InnerClassDef casted = (InnerClassDef) obj;
 141  0 if (! (getMav().equals(casted.getMav()))) return false;
 142  0 if (! (getName().equals(casted.getName()))) return false;
 143  0 if (this.getTypeParameters().length != casted.getTypeParameters().length) return false;
 144  0 for (int i = 0; i < getTypeParameters().length; i++) if (! getTypeParameters()[i].equals(casted.getTypeParameters()[i])) return false;
 145  0 if (! (getSuperclass().equals(casted.getSuperclass()))) return false;
 146  0 if (this.getInterfaces().length != casted.getInterfaces().length) return false;
 147  0 for (int i = 0; i < getInterfaces().length; i++) if (! getInterfaces()[i].equals(casted.getInterfaces()[i])) return false;
 148  0 if (! (getBody().equals(casted.getBody()))) return false;
 149  0 return true;
 150    }
 151    }
 152   
 153    /**
 154    * Implementation of hashCode that is consistent with
 155    * equals. The value of the hashCode is formed by
 156    * XORing the hashcode of the class object with
 157    * the hashcodes of all the fields of the object.
 158    */
 159  0 protected int generateHashCode() {
 160  0 int code = getClass().hashCode();
 161  0 code ^= 0;
 162  0 code ^= getMav().hashCode();
 163  0 code ^= getName().hashCode();
 164  0 for (int i = 0; i < getTypeParameters().length; i++) code ^= getTypeParameters()[i].hashCode();
 165  0 code ^= getSuperclass().hashCode();
 166  0 for (int i = 0; i < getInterfaces().length; i++) code ^= getInterfaces()[i].hashCode();
 167  0 code ^= getBody().hashCode();
 168  0 return code;
 169    }
 170    }