1
|
package jdeserialize;
|
2
|
|
3
|
/**
|
4
|
* <p>
|
5
|
* Represents an enum instance. As noted in the serialization spec, this consists of
|
6
|
* merely the class description (represented by a classdesc) and the string corresponding
|
7
|
* to the enum's value. No other fields are ever serialized.
|
8
|
* </p>
|
9
|
*/
|
10
|
public class enumobj extends contentbase {
|
11
|
/**
|
12
|
* The enum's class description.
|
13
|
*/
|
14
|
public classdesc classdesc;
|
15
|
|
16
|
/**
|
17
|
* The string that represents the enum's value.
|
18
|
*/
|
19
|
public stringobj value;
|
20
|
|
21
|
/**
|
22
|
* Constructor.
|
23
|
*
|
24
|
* @param handle the enum's handle
|
25
|
* @param cd the enum's class description
|
26
|
* @param so the enum's value
|
27
|
*/
|
28
|
public enumobj(int handle, classdesc cd, stringobj so) {
|
29
|
super(contenttype.ENUM);
|
30
|
this.handle = handle;
|
31
|
this.classdesc = cd;
|
32
|
this.value = so;
|
33
|
}
|
34
|
public String toString() {
|
35
|
return this.value.value;
|
36
|
}
|
37
|
}
|