Clover coverage report - DynamicJava Test Coverage (dynamicjava-20120303-r5436)
Coverage timestamp: Sat Mar 3 2012 03:02:19 CST
file stats: LOC: 115   Methods: 8
NCLOC: 77   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
IntersectionType.java 20.8% 38.3% 50% 34.2%
coverage coverage
 1    package edu.rice.cs.dynamicjava.symbol.type;
 2   
 3    import edu.rice.cs.dynamicjava.symbol.*;
 4   
 5    /**
 6    * Class IntersectionType, a component of the ASTGen-generated composite hierarchy.
 7    * Note: null is not allowed as a value for any field.
 8    * @version Generated automatically by ASTGen at Sat Mar 03 03:01:27 CST 2012
 9    */
 10    @SuppressWarnings("unused")
 11    public class IntersectionType extends BoundType {
 12   
 13    /**
 14    * Constructs a IntersectionType.
 15    * @throws java.lang.IllegalArgumentException If any parameter to the constructor is null.
 16    */
 17  4806 public IntersectionType(Iterable<? extends Type> in_ofTypes) {
 18  4806 super(in_ofTypes);
 19    }
 20   
 21   
 22  4908 public <RetType> RetType apply(TypeVisitor<RetType> visitor) {
 23  4908 return visitor.forIntersectionType(this);
 24    }
 25   
 26  0 public void apply(TypeVisitor_void visitor) {
 27  0 visitor.forIntersectionType(this);
 28    }
 29   
 30    /**
 31    * Implementation of toString that uses
 32    * {@link #output} to generate a nicely tabbed tree.
 33    */
 34  0 public java.lang.String toString() {
 35  0 java.io.StringWriter w = new java.io.StringWriter();
 36  0 walk(new ToStringWalker(w, 2));
 37  0 return w.toString();
 38    }
 39   
 40    /**
 41    * Prints this object out as a nicely tabbed tree.
 42    */
 43  0 public void output(java.io.Writer writer) {
 44  0 walk(new ToStringWalker(writer, 2));
 45    }
 46   
 47    /**
 48    * Implementation of equals that is based on the values of the fields of the
 49    * object. Thus, two objects created with identical parameters will be equal.
 50    */
 51  20474 public boolean equals(java.lang.Object obj) {
 52  0 if (obj == null) return false;
 53  20474 if ((obj.getClass() != this.getClass()) || (obj.hashCode() != this.hashCode())) {
 54  4704 return false;
 55    }
 56    else {
 57  15770 IntersectionType casted = (IntersectionType) obj;
 58  15770 Iterable<? extends Type> temp_ofTypes = ofTypes();
 59  15770 Iterable<? extends Type> casted_ofTypes = casted.ofTypes();
 60  15770 if (temp_ofTypes != casted_ofTypes) {
 61  0 java.util.Iterator<? extends Type> iter_temp_ofTypes = temp_ofTypes.iterator();
 62  0 java.util.Iterator<? extends Type> iter_casted_ofTypes = casted_ofTypes.iterator();
 63  0 while (iter_temp_ofTypes.hasNext() && iter_casted_ofTypes.hasNext()) {
 64  0 Type elt_temp_ofTypes = iter_temp_ofTypes.next();
 65  0 Type elt_casted_ofTypes = iter_casted_ofTypes.next();
 66  0 if (!(elt_temp_ofTypes == elt_casted_ofTypes || elt_temp_ofTypes != null && elt_casted_ofTypes!= null && elt_temp_ofTypes.equals(elt_casted_ofTypes))) return false;
 67    }
 68  0 if (iter_temp_ofTypes.hasNext() || iter_casted_ofTypes.hasNext()) return false;
 69    }
 70  15770 return true;
 71    }
 72    }
 73   
 74   
 75    /**
 76    * Implementation of hashCode that is consistent with equals. The value of
 77    * the hashCode is formed by XORing the hashcode of the class object with
 78    * the hashcodes of all the fields of the object.
 79    */
 80  4366 public int generateHashCode() {
 81  4366 int code = getClass().hashCode();
 82  4366 Iterable<? extends Type> temp_ofTypes = ofTypes();
 83  4366 code ^= temp_ofTypes.getClass().hashCode();
 84  4366 int index_temp_ofTypes = 0;
 85  4366 for (Type elt_temp_ofTypes : temp_ofTypes) {
 86  10287 code ^= index_temp_ofTypes++;
 87  10287 code ^= (elt_temp_ofTypes == null) ? 0 : elt_temp_ofTypes.hashCode();
 88    }
 89  4366 return code;
 90    }
 91   
 92  0 public void walk(TreeWalker w) {
 93  0 if (w.visitNode(this, "IntersectionType", 1)) {
 94  0 Iterable<? extends Type> temp_ofTypes = ofTypes();
 95  0 if (w.visitNodeField("ofTypes", temp_ofTypes)) {
 96  0 if (w.visitIterated(temp_ofTypes)) {
 97  0 int i_temp_ofTypes = 0;
 98  0 for (Type elt_temp_ofTypes : temp_ofTypes) {
 99  0 if (w.visitIteratedElement(i_temp_ofTypes, elt_temp_ofTypes)) {
 100  0 if (elt_temp_ofTypes == null) w.visitNull();
 101    else {
 102  0 elt_temp_ofTypes.walk(w);
 103    }
 104    }
 105  0 i_temp_ofTypes++;
 106    }
 107  0 w.endIterated(temp_ofTypes, i_temp_ofTypes);
 108    }
 109  0 w.endNodeField("ofTypes", temp_ofTypes);
 110    }
 111  0 w.endNode(this, "IntersectionType", 1);
 112    }
 113    }
 114   
 115    }