Package proguard.evaluation.value
Class ParticularReferenceValue
- java.lang.Object
-
- proguard.evaluation.value.Value
-
- proguard.evaluation.value.Category1Value
-
- proguard.evaluation.value.ReferenceValue
-
- proguard.evaluation.value.TypedReferenceValue
-
- proguard.evaluation.value.IdentifiedReferenceValue
-
- proguard.evaluation.value.ParticularReferenceValue
-
public class ParticularReferenceValue extends IdentifiedReferenceValue
ThisParticularReferenceValue
represents a particular reference value, i.e. a reference with an associated value. E.g., a String with the value "HelloWorld".
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
ARRAY_EXCEPTIONS
-
Fields inherited from class proguard.evaluation.value.IdentifiedReferenceValue
id
-
Fields inherited from class proguard.evaluation.value.TypedReferenceValue
ALLOW_INCOMPLETE_CLASS_HIERARCHY, INCOMPLETE_CLASS_HIERARCHY, mayBeExtension, mayBeNull, referencedClass, type, WARN_INCOMPLETE_CLASS_HIERARCHY
-
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 ParticularReferenceValue(Clazz referencedClass, ValueFactory valueFactory, java.lang.Object referenceID, @NotNull AnalyzedObject value)
Create a new Instance with the given type, the class it is referenced in, and its actual value.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ReferenceValue
cast(java.lang.String type, Clazz referencedClass, ValueFactory valueFactory, boolean alwaysCast)
Returns this ReferenceValue, cast to the given type.int
equal(ReferenceValue other)
Returns whether this ReferenceValue is equal to the given other ReferenceValue.boolean
equals(java.lang.Object o)
ReferenceValue
generalize(ParticularReferenceValue other)
Returns the generalization of this ReferenceValue and the given other ParticularReferenceValue.ReferenceValue
generalize(ReferenceValue other)
Returns the generalization of this ReferenceValue and the given other ReferenceValue.@NotNull AnalyzedObject
getValue()
int
hashCode()
int
instanceOf(java.lang.String otherType, Clazz otherReferencedClass)
Returns whether the type is an instance of the given type.int
isNull()
Returns whether this ReferenceValue isnull
.boolean
isParticular()
Returns whether this Value represents a single particular (known) value.java.lang.String
toString()
java.lang.Object
value()
Deprecated.-
Methods inherited from class proguard.evaluation.value.IdentifiedReferenceValue
equal, generalize, isSpecific
-
Methods inherited from class proguard.evaluation.value.TypedReferenceValue
allowsIncompleteClassHierarchy, arrayStore, doubleArrayLoad, equal, floatArrayLoad, generalize, generalizeMayBeNull, getReferencedClass, getType, integerArrayLoad, internalType, longArrayLoad, mayBeExtension, referenceArrayLoad
-
Methods inherited from class proguard.evaluation.value.ReferenceValue
arrayLength, computationalType, equal, equal, equal, equal, equal, equal, equal, generalize, generalize, generalize, generalize, generalize, generalize, generalize, isNotNull, notEqual, referenceValue
-
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
-
ParticularReferenceValue
public ParticularReferenceValue(Clazz referencedClass, ValueFactory valueFactory, java.lang.Object referenceID, @NotNull @NotNull AnalyzedObject value)
Create a new Instance with the given type, the class it is referenced in, and its actual value.
-
-
Method Detail
-
value
@Deprecated public java.lang.Object value()
Deprecated.Deprecated, usegetValue()
.- Overrides:
value
in classReferenceValue
-
getValue
@NotNull public @NotNull AnalyzedObject getValue()
- Overrides:
getValue
in classReferenceValue
-
isParticular
public boolean isParticular()
Description copied from class:Value
Returns whether this Value represents a single particular (known) value.- Overrides:
isParticular
in classTypedReferenceValue
-
isNull
public int isNull()
Description copied from class:ReferenceValue
Returns whether this ReferenceValue isnull
.- Overrides:
isNull
in classTypedReferenceValue
- 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.- Overrides:
instanceOf
in classTypedReferenceValue
-
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.- Overrides:
cast
in classTypedReferenceValue
-
generalize
public ReferenceValue generalize(ReferenceValue other)
Description copied from class:ReferenceValue
Returns the generalization of this ReferenceValue and the given other ReferenceValue.- Overrides:
generalize
in classIdentifiedReferenceValue
-
generalize
public ReferenceValue generalize(ParticularReferenceValue other)
Description copied from class:ReferenceValue
Returns the generalization of this ReferenceValue and the given other ParticularReferenceValue.- Overrides:
generalize
in classReferenceValue
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classIdentifiedReferenceValue
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classIdentifiedReferenceValue
-
equal
public int equal(ReferenceValue other)
Description copied from class:ReferenceValue
Returns whether this ReferenceValue is equal to the given other ReferenceValue.- Overrides:
equal
in classIdentifiedReferenceValue
- Returns:
NEVER
,MAYBE
, orALWAYS
.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classIdentifiedReferenceValue
-
-