-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathIntType.java
More file actions
79 lines (66 loc) · 2.01 KB
/
IntType.java
File metadata and controls
79 lines (66 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
package edu.rice.cs.drjava.model.repl.types;
import edu.rice.cs.drjava.model.repl.newjvm.*;
/**
* Class IntType, a component of the ASTGen-generated composite hierarchy.
* Note: null is not allowed as a value for any field.
* @version Generated automatically by ASTGen at Thu Oct 16 08:57:12 CDT 2014
*/
//@SuppressWarnings("unused")
public class IntType extends IntegerType {
/**
* Constructs a IntType.
* @throws java.lang.IllegalArgumentException If any parameter to the constructor is null.
*/
public IntType() {
super();
}
public <RetType> RetType apply(TypeVisitor<RetType> visitor) {
return visitor.forIntType(this);
}
public void apply(TypeVisitor_void visitor) {
visitor.forIntType(this);
}
/**
* Implementation of toString that uses
* {@link #output} to generate a nicely tabbed tree.
*/
public java.lang.String toString() {
java.io.StringWriter w = new java.io.StringWriter();
walk(new ToStringWalker(w, 2));
return w.toString();
}
/**
* Prints this object out as a nicely tabbed tree.
*/
public void output(java.io.Writer writer) {
walk(new ToStringWalker(writer, 2));
}
/**
* Implementation of equals that is based on the values of the fields of the
* object. Thus, two objects created with identical parameters will be equal.
*/
public boolean equals(java.lang.Object obj) {
if (obj == null) return false;
if ((obj.getClass() != this.getClass()) || (obj.hashCode() != this.hashCode())) {
return false;
}
else {
IntType casted = (IntType) obj;
return true;
}
}
/**
* Implementation of hashCode that is consistent with equals. The value of
* the hashCode is formed by XORing the hashcode of the class object with
* the hashcodes of all the fields of the object.
*/
public int generateHashCode() {
int code = getClass().hashCode();
return code;
}
public void walk(TreeWalker w) {
if (w.visitNode(this, "IntType", 0)) {
w.endNode(this, "IntType", 0);
}
}
}