Clover coverage report - DynamicJava Test Coverage (dynamicjava-20120303-r5436)
Coverage timestamp: Sat Mar 3 2012 03:02:19 CST
file stats: LOC: 95   Methods: 9
NCLOC: 57   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
Wildcard.java 8.3% 32.3% 55.6% 30.8%
coverage coverage
 1    package edu.rice.cs.dynamicjava.symbol.type;
 2   
 3    import edu.rice.cs.dynamicjava.symbol.*;
 4   
 5    /**
 6    * Class Wildcard, 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 Wildcard extends Type {
 12    private final BoundedSymbol _symbol;
 13   
 14    /**
 15    * Constructs a Wildcard.
 16    * @throws java.lang.IllegalArgumentException If any parameter to the constructor is null.
 17    */
 18  170 public Wildcard(BoundedSymbol in_symbol) {
 19  170 super();
 20  170 if (in_symbol == null) {
 21  0 throw new java.lang.IllegalArgumentException("Parameter 'symbol' to the Wildcard constructor was null");
 22    }
 23  170 _symbol = in_symbol;
 24    }
 25   
 26  1378 final public BoundedSymbol symbol() { return _symbol; }
 27   
 28  399 public <RetType> RetType apply(TypeVisitor<RetType> visitor) {
 29  399 return visitor.forWildcard(this);
 30    }
 31   
 32  9 public void apply(TypeVisitor_void visitor) {
 33  9 visitor.forWildcard(this);
 34    }
 35   
 36    /**
 37    * Implementation of toString that uses
 38    * {@link #output} to generate a nicely tabbed tree.
 39    */
 40  0 public java.lang.String toString() {
 41  0 java.io.StringWriter w = new java.io.StringWriter();
 42  0 walk(new ToStringWalker(w, 2));
 43  0 return w.toString();
 44    }
 45   
 46    /**
 47    * Prints this object out as a nicely tabbed tree.
 48    */
 49  0 public void output(java.io.Writer writer) {
 50  0 walk(new ToStringWalker(writer, 2));
 51    }
 52   
 53    /**
 54    * Implementation of equals that is based on the values of the fields of the
 55    * object. Thus, two objects created with identical parameters will be equal.
 56    */
 57  0 public boolean equals(java.lang.Object obj) {
 58  0 if (obj == null) return false;
 59  0 if ((obj.getClass() != this.getClass()) || (obj.hashCode() != this.hashCode())) {
 60  0 return false;
 61    }
 62    else {
 63  0 Wildcard casted = (Wildcard) obj;
 64  0 BoundedSymbol temp_symbol = symbol();
 65  0 BoundedSymbol casted_symbol = casted.symbol();
 66  0 if (!(temp_symbol == casted_symbol || temp_symbol.equals(casted_symbol))) return false;
 67  0 return true;
 68    }
 69    }
 70   
 71   
 72    /**
 73    * Implementation of hashCode that is consistent with equals. The value of
 74    * the hashCode is formed by XORing the hashcode of the class object with
 75    * the hashcodes of all the fields of the object.
 76    */
 77  141 public int generateHashCode() {
 78  141 int code = getClass().hashCode();
 79  141 BoundedSymbol temp_symbol = symbol();
 80  141 code ^= temp_symbol.hashCode();
 81  141 return code;
 82    }
 83   
 84  0 public void walk(TreeWalker w) {
 85  0 if (w.visitNode(this, "Wildcard", 1)) {
 86  0 BoundedSymbol temp_symbol = symbol();
 87  0 if (w.visitNodeField("symbol", temp_symbol)) {
 88  0 w.visitUnknownObject(temp_symbol);
 89  0 w.endNodeField("symbol", temp_symbol);
 90    }
 91  0 w.endNode(this, "Wildcard", 1);
 92    }
 93    }
 94   
 95    }