Clover coverage report - Java Language Levels Test Coverage (javalanglevels-20120305-r5436)
Coverage timestamp: Sun Mar 4 2012 22:02:46 CST
file stats: LOC: 93   Methods: 8
NCLOC: 54   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
TypeVariable.java 20% 44.1% 37.5% 38.5%
coverage coverage
 1    package edu.rice.cs.javalanglevels.tree;
 2   
 3    import edu.rice.cs.javalanglevels.SourceInfo;
 4   
 5    /**
 6    * Class TypeVariable, 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 TypeVariable extends ReferenceType {
 11   
 12    /**
 13    * Constructs a TypeVariable.
 14    * @throws java.lang.IllegalArgumentException If any parameter to the constructor is null.
 15    */
 16  24 public TypeVariable(SourceInfo in_sourceInfo, String in_name) {
 17  24 super(in_sourceInfo, in_name);
 18    }
 19   
 20   
 21  2 public <RetType> RetType visit(JExpressionIFVisitor<RetType> visitor) { return visitor.forTypeVariable(this); }
 22  0 public void visit(JExpressionIFVisitor_void visitor) { visitor.forTypeVariable(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  4 public void outputHelp(TabPrintWriter writer) {
 42  4 writer.print("TypeVariable" + ":");
 43  4 writer.indent();
 44   
 45  4 writer.startLine("");
 46  4 writer.print("sourceInfo = ");
 47  4 SourceInfo temp_sourceInfo = getSourceInfo();
 48  4 if (temp_sourceInfo == null) {
 49  0 writer.print("null");
 50    } else {
 51  4 writer.print(temp_sourceInfo);
 52    }
 53   
 54  4 writer.startLine("");
 55  4 writer.print("name = ");
 56  4 String temp_name = getName();
 57  4 if (temp_name == null) {
 58  0 writer.print("null");
 59    } else {
 60  4 writer.print(temp_name);
 61    }
 62  4 writer.unindent();
 63    }
 64   
 65    /**
 66    * Implementation of equals that is based on the values
 67    * of the fields of the object. Thus, two objects
 68    * created with identical parameters will be equal.
 69    */
 70  0 public boolean equals(java.lang.Object obj) {
 71  0 if (obj == null) return false;
 72  0 if ((obj.getClass() != this.getClass()) || (obj.hashCode() != this.hashCode())) {
 73  0 return false;
 74    } else {
 75  0 TypeVariable casted = (TypeVariable) obj;
 76  0 if (! (getName() == casted.getName())) return false;
 77  0 return true;
 78    }
 79    }
 80   
 81    /**
 82    * Implementation of hashCode that is consistent with
 83    * equals. The value of the hashCode is formed by
 84    * XORing the hashcode of the class object with
 85    * the hashcodes of all the fields of the object.
 86    */
 87  0 protected int generateHashCode() {
 88  0 int code = getClass().hashCode();
 89  0 code ^= 0;
 90  0 code ^= getName().hashCode();
 91  0 return code;
 92    }
 93    }