BasicValuepublic class BasicValue extends Object implements ValueA {@link Value} that is represented by its type in a seven types type sytem.
This type system distinguishes the UNINITIALZED, INT, FLOAT, LONG, DOUBLE,
REFERENCE and RETURNADDRESS types. |
Fields Summary |
---|
public static final Value | UNINITIALIZED_VALUE | public static final Value | INT_VALUE | public static final Value | FLOAT_VALUE | public static final Value | LONG_VALUE | public static final Value | DOUBLE_VALUE | public static final Value | REFERENCE_VALUE | public static final Value | RETURNADDRESS_VALUE | private Type | type |
Constructors Summary |
---|
public BasicValue(Type type)
this.type = type;
|
Methods Summary |
---|
public boolean | equals(Value value)
if (value == this) {
return true;
} else if (value instanceof BasicValue) {
if (type == null) {
return ((BasicValue)value).type == null;
} else {
return type.equals(((BasicValue)value).type);
}
} else {
return false;
}
| public int | getSize()
return type == Type.LONG_TYPE || type == Type.DOUBLE_TYPE ? 2 : 1;
| public oracle.toplink.libraries.asm.Type | getType()
return type;
| public boolean | isReference()
return type != null && (type.getSort() == Type.OBJECT || type.getSort() == Type.ARRAY);
| public java.lang.String | toString()
if (this == UNINITIALIZED_VALUE) {
return ".";
} else if (this == RETURNADDRESS_VALUE) {
return "A";
} else if (this == REFERENCE_VALUE) {
return "R";
} else {
return type.getDescriptor();
}
|
|