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