6 * represents a symbol in the language (var name, function name, etc).
9 public class TypeDescriptor extends Descriptor {
10 public static final int BYTE=1;
11 public static final int SHORT=2;
12 public static final int INT=3;
13 public static final int LONG=4;
14 public static final int CHAR=5;
15 public static final int BOOLEAN=6;
16 public static final int FLOAT=7;
17 public static final int DOUBLE=8;
18 public static final int VOID=9;
19 public static final int NULL=10;
20 public static final int CLASS=11;
25 NameDescriptor name_desc;
26 ClassDescriptor class_desc;
28 public void setClassDescriptor(ClassDescriptor cd) {
32 public boolean isVoid() {
36 public boolean isPrimitive() {
37 return ((type>=BYTE)&&(type<=DOUBLE));
40 public boolean isClass() {
44 public TypeDescriptor(NameDescriptor name) {
45 super(name.toString());
51 public TypeDescriptor(int t) {
56 public String toString() {
58 return name_desc.toString();
60 return decodeInt(type);
63 private static String decodeInt(int type) {
66 else if (type==BOOLEAN)
78 else if (type==DOUBLE)
84 else throw new Error();