forked from DrJavaAtRice/drjava
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRawClassType.java
More file actions
89 lines (76 loc) · 2.54 KB
/
Copy pathRawClassType.java
File metadata and controls
89 lines (76 loc) · 2.54 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
80
81
82
83
84
85
86
87
88
89
package edu.rice.cs.drjava.model.repl.types;
import edu.rice.cs.drjava.model.repl.newjvm.*;
/**
* Class RawClassType, 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 RawClassType extends ClassType {
/**
* Constructs a RawClassType.
* @throws java.lang.IllegalArgumentException If any parameter to the constructor is null.
*/
public RawClassType(DJClass in_ofClass) {
super(in_ofClass);
}
public <RetType> RetType apply(TypeVisitor<RetType> visitor) {
return visitor.forRawClassType(this);
}
public void apply(TypeVisitor_void visitor) {
visitor.forRawClassType(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 {
RawClassType casted = (RawClassType) obj;
DJClass temp_ofClass = ofClass();
DJClass casted_ofClass = casted.ofClass();
if (!(temp_ofClass == casted_ofClass || temp_ofClass.equals(casted_ofClass))) return false;
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();
DJClass temp_ofClass = ofClass();
code ^= temp_ofClass.hashCode();
return code;
}
public void walk(TreeWalker w) {
if (w.visitNode(this, "RawClassType", 1)) {
DJClass temp_ofClass = ofClass();
if (w.visitNodeField("ofClass", temp_ofClass)) {
w.visitUnknownObject(temp_ofClass);
w.endNodeField("ofClass", temp_ofClass);
}
w.endNode(this, "RawClassType", 1);
}
}
}