+ public String getSafeDescriptor() {
+ //Can't safely use [ in C
+ if (isArray())
+ return "_AR_"+this.dereference().getSafeDescriptor();
+ else if (isClass()||isEnum())
+ return class_desc.getSafeDescriptor();
+ else if (isByte())
+ return "B";
+ else if (isChar())
+ return "C";
+ else if (isShort())
+ return "S";
+ else if (isBoolean())
+ return "Z";
+ else if (isInt())
+ return "I";
+ else if (isLong())
+ return "J";
+ else if (isDouble())
+ return "D";
+ else if (isFloat())
+ return "F";
+ else if (isTag())
+ return "T";
+ else throw new Error(toString());
+ }
+
+ public boolean isNumber() {
+ return (isIntegerType()||isFloat()||isDouble());
+ }
+
+ public boolean isByte() {
+ return type==BYTE;
+ }
+ public boolean isNull() {
+ return type==NULL;
+ }
+ public boolean isShort() {
+ return type==SHORT;
+ }
+ public boolean isInt() {
+ return type==INT;
+ }
+ public boolean isLong() {
+ return type==LONG;
+ }
+ public boolean isChar() {
+ return type==CHAR;
+ }
+ public boolean isBoolean() {
+ return type==BOOLEAN;
+ }
+ public boolean isFloat() {
+ return type==FLOAT;
+ }
+ public boolean isDouble() {
+ return type==DOUBLE;
+ }
+ public boolean isVoid() {
+ return type==VOID;
+ }
+
+ public boolean isOffset() {
+ return type==OFFSET;
+ }
+
+ public boolean isPtr() {
+ return (isClass()||isNull()||isTag()||isArray());
+ }