Package proguard.evaluation.value
Class TracedReferenceValue
- java.lang.Object
-
- proguard.evaluation.value.Value
-
- proguard.evaluation.value.Category1Value
-
- proguard.evaluation.value.ReferenceValue
-
- proguard.evaluation.value.TracedReferenceValue
-
public class TracedReferenceValue extends ReferenceValue
ThisReferenceValue
represents a reference value that is tagged with a trace value.
-
-
Field Summary
-
Fields inherited from class proguard.evaluation.value.Value
ALWAYS, MAYBE, NEVER, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INSTRUCTION_OFFSET, TYPE_INTEGER, TYPE_LONG, TYPE_REFERENCE, TYPE_TOP, TYPE_UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description TracedReferenceValue(ReferenceValue referenceValue, Value traceValue)
Creates a new reference value with the given ID.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegerValue
arrayLength(ValueFactory valueFactory)
Returns the length of the array, assuming this type is an array.void
arrayStore(IntegerValue indexValue, Value value)
Stores the given value at the given index in the given array, assuming this type is an array.ReferenceValue
cast(java.lang.String type, Clazz referencedClass, ValueFactory valueFactory, boolean alwaysCast)
Returns this ReferenceValue, cast to the given type.DoubleValue
doubleArrayLoad(IntegerValue indexValue, ValueFactory valueFactory)
Returns the value of the array at the given index, assuming this type is an double array.int
equal(ArrayReferenceValue other)
Returns whether this ReferenceValue is equal to the given other ArrayReferenceValue.int
equal(DetailedArrayReferenceValue other)
Returns whether this ReferenceValue is equal to the given other DetailedArrayReferenceValue.int
equal(IdentifiedArrayReferenceValue other)
Returns whether this ReferenceValue is equal to the given other IdentifiedArrayReferenceValue.int
equal(IdentifiedReferenceValue other)
Returns whether this ReferenceValue is equal to the given other IdentifiedReferenceValue.int
equal(ReferenceValue other)
Returns whether this ReferenceValue is equal to the given other ReferenceValue.int
equal(TracedReferenceValue other)
Returns whether this ReferenceValue is equal to the given other TracedReferenceValue.int
equal(TypedReferenceValue other)
Returns whether this ReferenceValue is equal to the given other TypedReferenceValue.int
equal(UnknownReferenceValue other)
Returns whether this ReferenceValue is equal to the given other UnknownReferenceValue.boolean
equals(java.lang.Object object)
FloatValue
floatArrayLoad(IntegerValue indexValue, ValueFactory valueFactory)
Returns the value of the array at the given index, assuming this type is an float array.ReferenceValue
generalize(ArrayReferenceValue other)
Returns the generalization of this ReferenceValue and the given other ArrayReferenceValue.ReferenceValue
generalize(DetailedArrayReferenceValue other)
Returns the generalization of this ReferenceValue and the given other DetailedArrayReferenceValue.ReferenceValue
generalize(IdentifiedArrayReferenceValue other)
Returns the generalization of this ReferenceValue and the given other IdentifiedArrayReferenceValue.ReferenceValue
generalize(IdentifiedReferenceValue other)
Returns the generalization of this ReferenceValue and the given other IdentifiedReferenceValue.ReferenceValue
generalize(ReferenceValue other)
Returns the generalization of this ReferenceValue and the given other ReferenceValue.ReferenceValue
generalize(TracedReferenceValue other)
Returns the generalization of this ReferenceValue and the given other TracedReferenceValue.ReferenceValue
generalize(TypedReferenceValue other)
Returns the generalization of this ReferenceValue and the given other TypedReferenceValue.ReferenceValue
generalize(UnknownReferenceValue other)
Returns the generalization of this ReferenceValue and the given other UnknownReferenceValue.Clazz
getReferencedClass()
Returns the class that is referenced by the type.ReferenceValue
getReferenceValue()
Returns the reference value.Value
getTraceValue()
Returns the trace value.java.lang.String
getType()
Returns the type.int
hashCode()
int
instanceOf(java.lang.String otherType, Clazz otherReferencedClass)
Returns whether the type is an instance of the given type.IntegerValue
integerArrayLoad(IntegerValue indexValue, ValueFactory valueFactory)
Returns the value of the array at the given index, assuming this type is an integer array.java.lang.String
internalType()
Returns the internal type of this Value.int
isNull()
Returns whether this ReferenceValue isnull
.boolean
isParticular()
Returns whether this Value represents a single particular (known) value.boolean
isSpecific()
Returns whether this Value represents a single specific (but possibly unknown) value.LongValue
longArrayLoad(IntegerValue indexValue, ValueFactory valueFactory)
Returns the value of the array at the given index, assuming this type is an long array.boolean
mayBeExtension()
Returns whether the actual type of this ReferenceValue may be an extension of its type.ReferenceValue
referenceArrayLoad(IntegerValue indexValue, ValueFactory valueFactory)
Returns the value of the array at the given index, assuming this type is a reference array.java.lang.String
toString()
-
Methods inherited from class proguard.evaluation.value.ReferenceValue
computationalType, equal, equal, generalize, generalize, generalize, getValue, isNotNull, notEqual, referenceValue, value
-
Methods inherited from class proguard.evaluation.value.Category1Value
category1Value, isCategory2
-
Methods inherited from class proguard.evaluation.value.Value
category2Value, copyIfMutable, doubleValue, floatValue, instructionOffsetValue, integerValue, longValue
-
-
-
-
Constructor Detail
-
TracedReferenceValue
public TracedReferenceValue(ReferenceValue referenceValue, Value traceValue)
Creates a new reference value with the given ID.
-
-
Method Detail
-
getReferenceValue
public ReferenceValue getReferenceValue()
Returns the reference value.
-
getTraceValue
public Value getTraceValue()
Returns the trace value.
-
getType
public java.lang.String getType()
Description copied from class:ReferenceValue
Returns the type.- Specified by:
getType
in classReferenceValue
-
getReferencedClass
public Clazz getReferencedClass()
Description copied from class:ReferenceValue
Returns the class that is referenced by the type.- Specified by:
getReferencedClass
in classReferenceValue
-
mayBeExtension
public boolean mayBeExtension()
Description copied from class:ReferenceValue
Returns whether the actual type of this ReferenceValue may be an extension of its type.- Specified by:
mayBeExtension
in classReferenceValue
-
isNull
public int isNull()
Description copied from class:ReferenceValue
Returns whether this ReferenceValue isnull
.- Specified by:
isNull
in classReferenceValue
- Returns:
NEVER
,MAYBE
, orALWAYS
.
-
instanceOf
public int instanceOf(java.lang.String otherType, Clazz otherReferencedClass)
Description copied from class:ReferenceValue
Returns whether the type is an instance of the given type.- Specified by:
instanceOf
in classReferenceValue
-
cast
public ReferenceValue cast(java.lang.String type, Clazz referencedClass, ValueFactory valueFactory, boolean alwaysCast)
Description copied from class:ReferenceValue
Returns this ReferenceValue, cast to the given type.- Specified by:
cast
in classReferenceValue
-
arrayLength
public IntegerValue arrayLength(ValueFactory valueFactory)
Description copied from class:ReferenceValue
Returns the length of the array, assuming this type is an array.- Overrides:
arrayLength
in classReferenceValue
-
integerArrayLoad
public IntegerValue integerArrayLoad(IntegerValue indexValue, ValueFactory valueFactory)
Description copied from class:ReferenceValue
Returns the value of the array at the given index, assuming this type is an integer array.- Overrides:
integerArrayLoad
in classReferenceValue
-
longArrayLoad
public LongValue longArrayLoad(IntegerValue indexValue, ValueFactory valueFactory)
Description copied from class:ReferenceValue
Returns the value of the array at the given index, assuming this type is an long array.- Overrides:
longArrayLoad
in classReferenceValue
-
floatArrayLoad
public FloatValue floatArrayLoad(IntegerValue indexValue, ValueFactory valueFactory)
Description copied from class:ReferenceValue
Returns the value of the array at the given index, assuming this type is an float array.- Overrides:
floatArrayLoad
in classReferenceValue
-
doubleArrayLoad
public DoubleValue doubleArrayLoad(IntegerValue indexValue, ValueFactory valueFactory)
Description copied from class:ReferenceValue
Returns the value of the array at the given index, assuming this type is an double array.- Overrides:
doubleArrayLoad
in classReferenceValue
-
referenceArrayLoad
public ReferenceValue referenceArrayLoad(IntegerValue indexValue, ValueFactory valueFactory)
Description copied from class:ReferenceValue
Returns the value of the array at the given index, assuming this type is a reference array.- Overrides:
referenceArrayLoad
in classReferenceValue
-
arrayStore
public void arrayStore(IntegerValue indexValue, Value value)
Description copied from class:ReferenceValue
Stores the given value at the given index in the given array, assuming this type is an array.- Overrides:
arrayStore
in classReferenceValue
-
generalize
public ReferenceValue generalize(ReferenceValue other)
Description copied from class:ReferenceValue
Returns the generalization of this ReferenceValue and the given other ReferenceValue.- Specified by:
generalize
in classReferenceValue
-
equal
public int equal(ReferenceValue other)
Description copied from class:ReferenceValue
Returns whether this ReferenceValue is equal to the given other ReferenceValue.- Specified by:
equal
in classReferenceValue
- Returns:
NEVER
,MAYBE
, orALWAYS
.
-
generalize
public ReferenceValue generalize(UnknownReferenceValue other)
Description copied from class:ReferenceValue
Returns the generalization of this ReferenceValue and the given other UnknownReferenceValue.- Overrides:
generalize
in classReferenceValue
-
equal
public int equal(UnknownReferenceValue other)
Description copied from class:ReferenceValue
Returns whether this ReferenceValue is equal to the given other UnknownReferenceValue.- Overrides:
equal
in classReferenceValue
- Returns:
NEVER
,MAYBE
, orALWAYS
.
-
generalize
public ReferenceValue generalize(TypedReferenceValue other)
Description copied from class:ReferenceValue
Returns the generalization of this ReferenceValue and the given other TypedReferenceValue.- Overrides:
generalize
in classReferenceValue
-
equal
public int equal(TypedReferenceValue other)
Description copied from class:ReferenceValue
Returns whether this ReferenceValue is equal to the given other TypedReferenceValue.- Overrides:
equal
in classReferenceValue
- Returns:
NEVER
,MAYBE
, orALWAYS
.
-
generalize
public ReferenceValue generalize(IdentifiedReferenceValue other)
Description copied from class:ReferenceValue
Returns the generalization of this ReferenceValue and the given other IdentifiedReferenceValue.- Overrides:
generalize
in classReferenceValue
-
equal
public int equal(IdentifiedReferenceValue other)
Description copied from class:ReferenceValue
Returns whether this ReferenceValue is equal to the given other IdentifiedReferenceValue.- Overrides:
equal
in classReferenceValue
- Returns:
NEVER
,MAYBE
, orALWAYS
.
-
generalize
public ReferenceValue generalize(ArrayReferenceValue other)
Description copied from class:ReferenceValue
Returns the generalization of this ReferenceValue and the given other ArrayReferenceValue.- Overrides:
generalize
in classReferenceValue
-
equal
public int equal(ArrayReferenceValue other)
Description copied from class:ReferenceValue
Returns whether this ReferenceValue is equal to the given other ArrayReferenceValue.- Overrides:
equal
in classReferenceValue
- Returns:
NEVER
,MAYBE
, orALWAYS
.
-
generalize
public ReferenceValue generalize(IdentifiedArrayReferenceValue other)
Description copied from class:ReferenceValue
Returns the generalization of this ReferenceValue and the given other IdentifiedArrayReferenceValue.- Overrides:
generalize
in classReferenceValue
-
equal
public int equal(IdentifiedArrayReferenceValue other)
Description copied from class:ReferenceValue
Returns whether this ReferenceValue is equal to the given other IdentifiedArrayReferenceValue.- Overrides:
equal
in classReferenceValue
- Returns:
NEVER
,MAYBE
, orALWAYS
.
-
generalize
public ReferenceValue generalize(DetailedArrayReferenceValue other)
Description copied from class:ReferenceValue
Returns the generalization of this ReferenceValue and the given other DetailedArrayReferenceValue.- Overrides:
generalize
in classReferenceValue
-
equal
public int equal(DetailedArrayReferenceValue other)
Description copied from class:ReferenceValue
Returns whether this ReferenceValue is equal to the given other DetailedArrayReferenceValue.- Overrides:
equal
in classReferenceValue
- Returns:
NEVER
,MAYBE
, orALWAYS
.
-
generalize
public ReferenceValue generalize(TracedReferenceValue other)
Description copied from class:ReferenceValue
Returns the generalization of this ReferenceValue and the given other TracedReferenceValue.- Overrides:
generalize
in classReferenceValue
-
equal
public int equal(TracedReferenceValue other)
Description copied from class:ReferenceValue
Returns whether this ReferenceValue is equal to the given other TracedReferenceValue.- Overrides:
equal
in classReferenceValue
- Returns:
NEVER
,MAYBE
, orALWAYS
.
-
isSpecific
public boolean isSpecific()
Description copied from class:Value
Returns whether this Value represents a single specific (but possibly unknown) value.- Overrides:
isSpecific
in classValue
-
isParticular
public boolean isParticular()
Description copied from class:Value
Returns whether this Value represents a single particular (known) value.- Overrides:
isParticular
in classValue
-
internalType
public java.lang.String internalType()
Description copied from class:Value
Returns the internal type of this Value.- Specified by:
internalType
in classValue
- Returns:
TypeConstants.BOOLEAN
,TypeConstants.BYTE
,TypeConstants.CHAR
,TypeConstants.SHORT
,TypeConstants.INT
,TypeConstants.LONG
,TypeConstants.FLOAT
,TypeConstants.DOUBLE
,TypeConstants.CLASS_START ... TypeConstants.CLASS_END
, or an array type containing any of these types (always as String).
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equals
in classReferenceValue
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classReferenceValue
-
toString
public java.lang.String toString()
- Overrides:
toString
in classReferenceValue
-
-