|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectValueTuple
public final class ValueTuple
This data structure holds a tuple of values for a particular program point. VarInfo objects can use this to get the values of the variables they represent.
It has two fields: vals and mods. While the arrays and their elements are interned, the ValueTuple objects themselves are not interned.
| Field Summary | |
|---|---|
static Logger |
debug
Debug tracer. |
static int |
MISSING_FLOW
Missing value because of data flow: this.x.x isn't available from a ppt. |
static int |
MISSING_FLOW_BITVAL
|
static int |
MISSING_NONSENSICAL
Missing value because the expression doesn't make sense: x.a when x is null. |
static int |
MISSING_NONSENSICAL_BITVAL
|
static int |
MODBIT_VALUES
Maximum mod bit value. |
static int |
MODIFIED
Modified. |
static int |
MODIFIED_BITVAL
|
int[] |
mods
Modification bit per value, possibly packed into fewer ints than the vals field. |
static int |
STATIC_CONSTANT
|
static int[] |
tuplemod_modified_not_missing
|
static int[] |
tuplemod_not_missing
|
static int |
TUPLEMOD_VALUES
|
static int |
UNMODIFIED
Not modified. |
static int |
UNMODIFIED_BITVAL
|
Object[] |
vals
|
| Constructor Summary | |
|---|---|
ValueTuple(Object[] vals,
int[] mods)
Default constructor that interns its argument. |
|
| Method Summary | |
|---|---|
void |
checkRep()
|
ValueTuple |
clone()
Creates and returns a copy of this. |
boolean |
equals(Object obj)
|
int |
getModified(VarInfo vi)
|
Object |
getValue(VarInfo vi)
Get the value of the variable vi in this ValueTuple. |
Object |
getValueOrNull(VarInfo vi)
Get the value of the variable vi in this ValueTuple, or null if it is missing. |
int |
hashCode()
|
boolean |
isMissing(VarInfo vi)
|
boolean |
isMissingFlow(VarInfo vi)
|
boolean |
isMissingNonsensical(VarInfo vi)
|
boolean |
isModified(VarInfo vi)
|
boolean |
isUnmodified(VarInfo vi)
|
static ValueTuple |
makeUninterned(Object[] vals,
int[] mods)
More convenient name for the constructor that doesn't intern. |
static int |
parseModified(String raw)
|
ValueTuple |
shallowcopy()
|
int |
size()
|
ValueTuple |
slice(int[] indices)
Return a new ValueTuple consisting of the elements of this one with indices listed in indices. |
String |
toString()
|
String |
toString(VarInfo[] vis)
Return the values of this tuple. |
ValueTuple |
trim(int len)
Return a new ValueTuple containing this one's first len elements. |
static String |
valsToString(Object[] vals)
|
static String |
valToString(Object val)
|
| Methods inherited from class Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static Logger debug
public Object[] vals
public int[] mods
public static final int UNMODIFIED
public static final int MODIFIED
public static final int MISSING_NONSENSICAL
public static final int MISSING_FLOW
public static final int MODBIT_VALUES
public static final int STATIC_CONSTANT
public static final int TUPLEMOD_VALUES
public static final int UNMODIFIED_BITVAL
public static final int MODIFIED_BITVAL
public static final int MISSING_NONSENSICAL_BITVAL
public static final int MISSING_FLOW_BITVAL
public static final int[] tuplemod_not_missing
public static final int[] tuplemod_modified_not_missing
| Constructor Detail |
|---|
public ValueTuple(Object[] vals,
int[] mods)
| Method Detail |
|---|
public int getModified(VarInfo vi)
public boolean isUnmodified(VarInfo vi)
public boolean isModified(VarInfo vi)
public boolean isMissingNonsensical(VarInfo vi)
public boolean isMissingFlow(VarInfo vi)
public boolean isMissing(VarInfo vi)
public static int parseModified(String raw)
public Object getValue(VarInfo vi)
vi - the variable whose value is to be returned
public Object getValueOrNull(VarInfo vi)
vi - the variable whose value is to be returned
getValue(VarInfo)public void checkRep()
public ValueTuple clone()
throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedException
public static ValueTuple makeUninterned(Object[] vals,
int[] mods)
public ValueTuple shallowcopy()
public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic int size()
public ValueTuple trim(int len)
public String toString()
toString in class Objectpublic String toString(VarInfo[] vis)
public static String valsToString(Object[] vals)
public static String valToString(Object val)
public ValueTuple slice(int[] indices)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||