Class ValueNumber
java.lang.Object
edu.umd.cs.findbugs.ba.vna.ValueNumber
- All Implemented Interfaces:
Comparable<ValueNumber>
A "value number" is a value produced somewhere in a methods. We use value numbers as dataflow values in Frames. When two frame slots have the same value number, then the same value is in both of those slots.
Instances of ValueNumbers produced by the same ValueNumberFactory are unique, so reference equality may be used to
determine whether or not two value numbers are the same. In general,
ValueNumbers from different factories cannot be compared.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int(package private) static MapCache<ValueNumber, ValueNumber> static final intstatic final int(package private) final intFlags representing meta information about the value.(package private) final intThe value number.static final intstatic final intFlag specifying that this value was the return value of a called method.(package private) static int(package private) static int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(ValueNumber other) static ValueNumbercreateValueNumber(int number) static ValueNumbercreateValueNumber(int number, int flags) booleanintgetFlags()intbooleanhasFlag(int flag) inthashCode()static intmergeFlags(int flags1, int flags2) toString()
-
Field Details
-
cache
-
valueNumbersCreated
static int valueNumbersCreated -
valueNumbersReused
static int valueNumbersReused -
number
final int numberThe value number. -
flags
final int flagsFlags representing meta information about the value. When value numbers are merged, their flags should be the flags common to both. -
RETURN_VALUE
public static final int RETURN_VALUEFlag specifying that this value was the return value of a called method.- See Also:
-
ARRAY_VALUE
public static final int ARRAY_VALUE- See Also:
-
CONSTANT_CLASS_OBJECT
public static final int CONSTANT_CLASS_OBJECT- See Also:
-
PHI_NODE
public static final int PHI_NODE- See Also:
-
CONSTANT_VALUE
public static final int CONSTANT_VALUE- See Also:
-
-
Constructor Details
-
ValueNumber
private ValueNumber(int number, int flags)
-
-
Method Details
-
mergeFlags
public static int mergeFlags(int flags1, int flags2) -
createValueNumber
-
createValueNumber
-
getNumber
public int getNumber() -
getFlags
public int getFlags() -
hasFlag
public boolean hasFlag(int flag) -
toString
-
hashCode
-
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<ValueNumber>
-