Package org.objectweb.asm.tree.analysis
Class SourceValue
java.lang.Object
org.objectweb.asm.tree.analysis.SourceValue
- All Implemented Interfaces:
Value
A
Value
which keeps track of the bytecode instructions that can produce it.-
Field Summary
Modifier and TypeFieldDescriptionfinal Set<AbstractInsnNode>
The instructions that can produce this value.final int
The size of this value, in 32 bits words. -
Constructor Summary
ConstructorDescriptionSourceValue
(int size) Constructs a newSourceValue
.SourceValue
(int size, Set<AbstractInsnNode> insnSet) Constructs a newSourceValue
.SourceValue
(int size, AbstractInsnNode insnNode) Constructs a newSourceValue
. -
Method Summary
-
Field Details
-
size
public final int sizeThe size of this value, in 32 bits words. This size is 1 for byte, boolean, char, short, int, float, object and array types, and 2 for long and double. -
insns
The instructions that can produce this value. For example, for the Java code below, the instructions that can produce the value ofi
at line 5 are the two ISTORE instructions at line 1 and 3:1: i = 0; 2: if (...) { 3: i = 1; 4: } 5: return i;
-
-
Constructor Details
-
SourceValue
public SourceValue(int size) Constructs a newSourceValue
.- Parameters:
size
- the size of this value, in 32 bits words. This size is 1 for byte, boolean, char, short, int, float, object and array types, and 2 for long and double.
-
SourceValue
Constructs a newSourceValue
.- Parameters:
size
- the size of this value, in 32 bits words. This size is 1 for byte, boolean, char, short, int, float, object and array types, and 2 for long and double.insnNode
- an instruction that can produce this value.
-
SourceValue
Constructs a newSourceValue
.- Parameters:
size
- the size of this value, in 32 bits words. This size is 1 for byte, boolean, char, short, int, float, object and array types, and 2 for long and double.insnSet
- the instructions that can produce this value.
-
-
Method Details
-
getSize
public int getSize()Returns the size of this value. -
equals
-
hashCode
public int hashCode()
-