Package proguard.evaluation
Class Variables
java.lang.Object
proguard.evaluation.Variables
- Direct Known Subclasses:
TracedVariables
This class represents a local variable frame that contains
Value instances. Values are
generalizations of all values that have been stored in the respective variables.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaload(int index) Loads the ReferenceValue from the variable with the given index.dload(int index) Loads the DoubleValue from the variable with the given index.booleanfload(int index) Loads the FloatValue from the variable with the given index.booleangeneralize(Variables other, boolean clearConflictingOtherVariables) Generalizes the values of this Variables object with the values of the given Variables object.getValue(int index) Gets the Value of the variable with the given index, without disturbing it.Value[]Gets the Values of the variables array, without disturbing it.inthashCode()iload(int index) Loads the IntegerValue from the variable with the given index.voidinitialize(Variables other) Initializes the values of this Variables object with the values of the given Variables object.lload(int index) Loads the LongValue from the variable with the given index.load(int index) Loads the Value from the variable with the given index.oload(int index) Loads the InstructionOffsetValue from the variable with the given index.voidreplaceReferences(Value toReplace, Value replacement) Replaces all the references to with references to .voidreplaceReferencesIf(Predicate<Value> predicate, UnaryOperator<Value> op) Apply to all values that match .voidreset(int size) Resets this Variables object, so that it can be reused.intsize()Returns the number of variables.voidStores the given Value at the given variable index.toString()
-
Field Details
-
values
-
size
protected int size
-
-
Constructor Details
-
Variables
public Variables(int size) Creates a new Variables object with a given maximum number of variables. -
Variables
Creates a Variables object that is a copy of the given Variables object.
-
-
Method Details
-
reset
public void reset(int size) Resets this Variables object, so that it can be reused. -
initialize
Initializes the values of this Variables object with the values of the given Variables object. The other object may have fewer values, in which case the remaining values are left unchanged. -
generalize
Generalizes the values of this Variables object with the values of the given Variables object.- Parameters:
clearConflictingOtherVariables- specifies whether the other variables should be cleared too, in case of conflicts.- Returns:
- whether the generalization has made any difference.
-
size
public int size()Returns the number of variables. -
getValue
Gets the Value of the variable with the given index, without disturbing it. -
getValues
Gets the Values of the variables array, without disturbing it. -
store
Stores the given Value at the given variable index. -
load
Loads the Value from the variable with the given index. -
iload
Loads the IntegerValue from the variable with the given index. -
lload
Loads the LongValue from the variable with the given index. -
fload
Loads the FloatValue from the variable with the given index. -
dload
Loads the DoubleValue from the variable with the given index. -
aload
Loads the ReferenceValue from the variable with the given index. -
oload
Loads the InstructionOffsetValue from the variable with the given index. -
replaceReferences
Replaces all the references to with references to . -
replaceReferencesIf
Apply to all values that match . -
equals
-
hashCode
public int hashCode() -
toString
-