Package proguard.evaluation.value
Class ReferenceValue
- java.lang.Object
-
- proguard.evaluation.value.Value
-
- proguard.evaluation.value.Category1Value
-
- proguard.evaluation.value.ReferenceValue
-
- Direct Known Subclasses:
MultiTypedReferenceValue,TracedReferenceValue,TypedReferenceValue,UnknownReferenceValue
public abstract class ReferenceValue extends Category1Value
Representation of a partially evaluated reference 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 ReferenceValue()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description IntegerValuearrayLength(ValueFactory valueFactory)Returns the length of the array, assuming this type is an array.voidarrayStore(IntegerValue indexValue, Value value)Stores the given value at the given index in the given array, assuming this type is an array.abstract ReferenceValuecast(java.lang.String type, Clazz referencedClass, ValueFactory valueFactory, boolean alwaysCast)Returns this ReferenceValue, cast to the given type.intcomputationalType()Returns the computational type of this Value.DoubleValuedoubleArrayLoad(IntegerValue indexValue, ValueFactory valueFactory)Returns the value of the array at the given index, assuming this type is an double array.intequal(ArrayReferenceValue other)Returns whether this ReferenceValue is equal to the given other ArrayReferenceValue.intequal(DetailedArrayReferenceValue other)Returns whether this ReferenceValue is equal to the given other DetailedArrayReferenceValue.intequal(IdentifiedArrayReferenceValue other)Returns whether this ReferenceValue is equal to the given other IdentifiedArrayReferenceValue.intequal(IdentifiedReferenceValue other)Returns whether this ReferenceValue is equal to the given other IdentifiedReferenceValue.intequal(MultiTypedReferenceValue other)Returns whether thisReferenceValueis equal to the given otherMultiTypedReferenceValue.intequal(ParticularReferenceValue other)Returns whether this ReferenceValue is equal to the given other ParticularReferenceValue.abstract intequal(ReferenceValue other)Returns whether this ReferenceValue is equal to the given other ReferenceValue.intequal(TracedReferenceValue other)Returns whether this ReferenceValue is equal to the given other TracedReferenceValue.intequal(TypedReferenceValue other)Returns whether this ReferenceValue is equal to the given other TypedReferenceValue.intequal(UnknownReferenceValue other)Returns whether this ReferenceValue is equal to the given other UnknownReferenceValue.booleanequals(java.lang.Object object)FloatValuefloatArrayLoad(IntegerValue indexValue, ValueFactory valueFactory)Returns the value of the array at the given index, assuming this type is an float array.ReferenceValuegeneralize(ArrayReferenceValue other)Returns the generalization of this ReferenceValue and the given other ArrayReferenceValue.ReferenceValuegeneralize(DetailedArrayReferenceValue other)Returns the generalization of this ReferenceValue and the given other DetailedArrayReferenceValue.ReferenceValuegeneralize(IdentifiedArrayReferenceValue other)Returns the generalization of this ReferenceValue and the given other IdentifiedArrayReferenceValue.ReferenceValuegeneralize(IdentifiedReferenceValue other)Returns the generalization of this ReferenceValue and the given other IdentifiedReferenceValue.ReferenceValuegeneralize(MultiTypedReferenceValue other)Returns the generalization of thisReferenceValueand the given otherMultiTypedReferenceValue.ReferenceValuegeneralize(ParticularReferenceValue other)Returns the generalization of this ReferenceValue and the given other ParticularReferenceValue.abstract ReferenceValuegeneralize(ReferenceValue other)Returns the generalization of this ReferenceValue and the given other ReferenceValue.ReferenceValuegeneralize(TracedReferenceValue other)Returns the generalization of this ReferenceValue and the given other TracedReferenceValue.ReferenceValuegeneralize(TypedReferenceValue other)Returns the generalization of this ReferenceValue and the given other TypedReferenceValue.ReferenceValuegeneralize(UnknownReferenceValue other)Returns the generalization of this ReferenceValue and the given other UnknownReferenceValue.Valuegeneralize(Value other)Returns the generalization of this Value and the given other Value.abstract ClazzgetReferencedClass()Returns the class that is referenced by the type.abstract java.lang.StringgetType()Returns the type.@NotNull AnalyzedObjectgetValue()inthashCode()abstract intinstanceOf(java.lang.String otherType, Clazz otherReferencedClass)Returns whether the type is an instance of the given type.IntegerValueintegerArrayLoad(IntegerValue indexValue, ValueFactory valueFactory)Returns the value of the array at the given index, assuming this type is an integer array.intisNotNull()Returns whether this ReferenceValue is notnull.abstract intisNull()Returns whether this ReferenceValue isnull.LongValuelongArrayLoad(IntegerValue indexValue, ValueFactory valueFactory)Returns the value of the array at the given index, assuming this type is an long array.abstract booleanmayBeExtension()Returns whether the actual type of this ReferenceValue may be an extension of its type.intnotEqual(ReferenceValue other)Returns whether this ReferenceValue and the given ReferenceValue are different.ReferenceValuereferenceArrayLoad(IntegerValue indexValue, ValueFactory valueFactory)Returns the value of the array at the given index, assuming this type is a reference array.ReferenceValuereferenceValue()Returns this Value as a ReferenceValue.java.lang.StringtoString()java.lang.Objectvalue()Deprecated.-
Methods inherited from class proguard.evaluation.value.Category1Value
category1Value, isCategory2
-
Methods inherited from class proguard.evaluation.value.Value
category2Value, copyIfMutable, doubleValue, floatValue, instructionOffsetValue, integerValue, internalType, isParticular, isSpecific, longValue
-
-
-
-
Method Detail
-
value
@Deprecated public java.lang.Object value()
Deprecated.Returns the value.Deprecated, use
getValue()instead.
-
getValue
@NotNull public @NotNull AnalyzedObject getValue()
-
getType
public abstract java.lang.String getType()
Returns the type.
-
getReferencedClass
public abstract Clazz getReferencedClass()
Returns the class that is referenced by the type.
-
mayBeExtension
public abstract boolean mayBeExtension()
Returns whether the actual type of this ReferenceValue may be an extension of its type.
-
isNull
public abstract int isNull()
Returns whether this ReferenceValue isnull.- Returns:
NEVER,MAYBE, orALWAYS.
-
instanceOf
public abstract int instanceOf(java.lang.String otherType, Clazz otherReferencedClass)Returns whether the type is an instance of the given type.
-
cast
public abstract ReferenceValue cast(java.lang.String type, Clazz referencedClass, ValueFactory valueFactory, boolean alwaysCast)
Returns this ReferenceValue, cast to the given type.
-
arrayLength
public IntegerValue arrayLength(ValueFactory valueFactory)
Returns the length of the array, assuming this type is an array.
-
integerArrayLoad
public IntegerValue integerArrayLoad(IntegerValue indexValue, ValueFactory valueFactory)
Returns the value of the array at the given index, assuming this type is an integer array.
-
longArrayLoad
public LongValue longArrayLoad(IntegerValue indexValue, ValueFactory valueFactory)
Returns the value of the array at the given index, assuming this type is an long array.
-
floatArrayLoad
public FloatValue floatArrayLoad(IntegerValue indexValue, ValueFactory valueFactory)
Returns the value of the array at the given index, assuming this type is an float array.
-
doubleArrayLoad
public DoubleValue doubleArrayLoad(IntegerValue indexValue, ValueFactory valueFactory)
Returns the value of the array at the given index, assuming this type is an double array.
-
referenceArrayLoad
public ReferenceValue referenceArrayLoad(IntegerValue indexValue, ValueFactory valueFactory)
Returns the value of the array at the given index, assuming this type is a reference array.
-
arrayStore
public void arrayStore(IntegerValue indexValue, Value value)
Stores the given value at the given index in the given array, assuming this type is an array.
-
generalize
public abstract ReferenceValue generalize(ReferenceValue other)
Returns the generalization of this ReferenceValue and the given other ReferenceValue.
-
equal
public abstract int equal(ReferenceValue other)
Returns whether this ReferenceValue is equal to the given other ReferenceValue.- Returns:
NEVER,MAYBE, orALWAYS.
-
isNotNull
public final int isNotNull()
Returns whether this ReferenceValue is notnull.- Returns:
NEVER,MAYBE, orALWAYS.
-
notEqual
public final int notEqual(ReferenceValue other)
Returns whether this ReferenceValue and the given ReferenceValue are different.- Returns:
NEVER,MAYBE, orALWAYS.
-
generalize
public ReferenceValue generalize(UnknownReferenceValue other)
Returns the generalization of this ReferenceValue and the given other UnknownReferenceValue.
-
equal
public int equal(UnknownReferenceValue other)
Returns whether this ReferenceValue is equal to the given other UnknownReferenceValue.- Returns:
NEVER,MAYBE, orALWAYS.
-
generalize
public ReferenceValue generalize(TypedReferenceValue other)
Returns the generalization of this ReferenceValue and the given other TypedReferenceValue.
-
equal
public int equal(TypedReferenceValue other)
Returns whether this ReferenceValue is equal to the given other TypedReferenceValue.- Returns:
NEVER,MAYBE, orALWAYS.
-
generalize
public ReferenceValue generalize(MultiTypedReferenceValue other)
Returns the generalization of thisReferenceValueand the given otherMultiTypedReferenceValue.
-
equal
public int equal(MultiTypedReferenceValue other)
Returns whether thisReferenceValueis equal to the given otherMultiTypedReferenceValue.- Returns:
NEVER,MAYBE, orALWAYS.
-
generalize
public ReferenceValue generalize(IdentifiedReferenceValue other)
Returns the generalization of this ReferenceValue and the given other IdentifiedReferenceValue.
-
equal
public int equal(IdentifiedReferenceValue other)
Returns whether this ReferenceValue is equal to the given other IdentifiedReferenceValue.- Returns:
NEVER,MAYBE, orALWAYS.
-
generalize
public ReferenceValue generalize(ArrayReferenceValue other)
Returns the generalization of this ReferenceValue and the given other ArrayReferenceValue.
-
equal
public int equal(ArrayReferenceValue other)
Returns whether this ReferenceValue is equal to the given other ArrayReferenceValue.- Returns:
NEVER,MAYBE, orALWAYS.
-
generalize
public ReferenceValue generalize(IdentifiedArrayReferenceValue other)
Returns the generalization of this ReferenceValue and the given other IdentifiedArrayReferenceValue.
-
equal
public int equal(IdentifiedArrayReferenceValue other)
Returns whether this ReferenceValue is equal to the given other IdentifiedArrayReferenceValue.- Returns:
NEVER,MAYBE, orALWAYS.
-
generalize
public ReferenceValue generalize(DetailedArrayReferenceValue other)
Returns the generalization of this ReferenceValue and the given other DetailedArrayReferenceValue.
-
equal
public int equal(DetailedArrayReferenceValue other)
Returns whether this ReferenceValue is equal to the given other DetailedArrayReferenceValue.- Returns:
NEVER,MAYBE, orALWAYS.
-
generalize
public ReferenceValue generalize(TracedReferenceValue other)
Returns the generalization of this ReferenceValue and the given other TracedReferenceValue.
-
equal
public int equal(TracedReferenceValue other)
Returns whether this ReferenceValue is equal to the given other TracedReferenceValue.- Returns:
NEVER,MAYBE, orALWAYS.
-
generalize
public ReferenceValue generalize(ParticularReferenceValue other)
Returns the generalization of this ReferenceValue and the given other ParticularReferenceValue.
-
equal
public int equal(ParticularReferenceValue other)
Returns whether this ReferenceValue is equal to the given other ParticularReferenceValue.- Returns:
NEVER,MAYBE, orALWAYS.
-
referenceValue
public final ReferenceValue referenceValue()
Description copied from class:ValueReturns this Value as a ReferenceValue.- Overrides:
referenceValuein classValue
-
generalize
public final Value generalize(Value other)
Description copied from class:ValueReturns the generalization of this Value and the given other Value.- Specified by:
generalizein classValue
-
computationalType
public final int computationalType()
Description copied from class:ValueReturns the computational type of this Value.- Specified by:
computationalTypein classValue- Returns:
TYPE_INTEGER,TYPE_LONG,TYPE_FLOAT,TYPE_DOUBLE,TYPE_REFERENCE, orTYPE_INSTRUCTION_OFFSET.
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-