|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectproguard.evaluation.value.Value
proguard.evaluation.value.Category1Value
proguard.evaluation.value.ReferenceValue
public class ReferenceValue
This class represents a partially evaluated reference value. It has a type
and a flag that indicates whether the value could be null. If
the type is null, the value is null.
| Field Summary | |
|---|---|
protected boolean |
mayBeNull
|
protected Clazz |
referencedClass
|
protected java.lang.String |
type
|
| 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 |
| Constructor Summary | |
|---|---|
ReferenceValue(java.lang.String type,
Clazz referencedClass,
boolean mayBeNull)
Creates a new ReferenceValue. |
|
| Method Summary | |
|---|---|
IntegerValue |
arrayLength(ValueFactory valueFactory)
Returns the length of the array, assuming this type is an array. |
Value |
arrayLoad(IntegerValue integerValue,
ValueFactory valueFactory)
Returns the value of the array at the given index, assuming this type is an array. |
int |
computationalType()
Returns the computational type of this Value. |
int |
equal(ReferenceValue other)
Returns whether this ReferenceValue is equal to the given other ReferenceValue. |
boolean |
equals(java.lang.Object object)
|
ReferenceValue |
generalize(ReferenceValue other)
Returns the generalization of this ReferenceValue and the given other ReferenceValue. |
Value |
generalize(Value other)
Returns the generalization of this Value and the given other Value. |
Clazz |
getReferencedClass()
Returns the class that is referenced by the type. |
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. |
java.lang.String |
internalType()
Returns the internal type of this Value. |
int |
isNotNull()
Returns whether this ReferenceValue is not null. |
int |
isNull()
Returns whether the type is null. |
boolean |
isParticular()
Returns whether this Value represents a single particular (known) value. |
int |
notEqual(ReferenceValue other)
Returns whether this ReferenceValue and the given ReferenceValue are different. |
ReferenceValue |
referenceValue()
Returns this Value as a ReferenceValue. |
java.lang.String |
toString()
|
| Methods inherited from class proguard.evaluation.value.Category1Value |
|---|
category1Value, isCategory2 |
| Methods inherited from class proguard.evaluation.value.Value |
|---|
category2Value, doubleValue, floatValue, instructionOffsetValue, integerValue, isSpecific, longValue |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final java.lang.String type
protected final Clazz referencedClass
protected final boolean mayBeNull
| Constructor Detail |
|---|
public ReferenceValue(java.lang.String type,
Clazz referencedClass,
boolean mayBeNull)
| Method Detail |
|---|
public java.lang.String getType()
public Clazz getReferencedClass()
public int isNull()
null.
public int instanceOf(java.lang.String otherType,
Clazz otherReferencedClass)
public IntegerValue arrayLength(ValueFactory valueFactory)
public Value arrayLoad(IntegerValue integerValue,
ValueFactory valueFactory)
public ReferenceValue generalize(ReferenceValue other)
public int equal(ReferenceValue other)
NEVER, MAYBE, or ALWAYS.public final int isNotNull()
null.
NEVER, MAYBE, or ALWAYS.public final int notEqual(ReferenceValue other)
NEVER, MAYBE, or ALWAYS.public final ReferenceValue referenceValue()
Value
referenceValue in class Valuepublic final Value generalize(Value other)
Value
generalize in class Valuepublic boolean isParticular()
Value
isParticular in class Valuepublic final int computationalType()
Value
computationalType in class ValueTYPE_INTEGER,
TYPE_LONG,
TYPE_FLOAT,
TYPE_DOUBLE,
TYPE_REFERENCE, or
TYPE_INSTRUCTION_OFFSET.public final java.lang.String internalType()
Value
internalType in class ValueClassConstants.INTERNAL_TYPE_BOOLEAN,
ClassConstants.INTERNAL_TYPE_BYTE,
ClassConstants.INTERNAL_TYPE_CHAR,
ClassConstants.INTERNAL_TYPE_SHORT,
ClassConstants.INTERNAL_TYPE_INT,
ClassConstants.INTERNAL_TYPE_LONG,
ClassConstants.INTERNAL_TYPE_FLOAT,
ClassConstants.INTERNAL_TYPE_DOUBLE,
ClassConstants.INTERNAL_TYPE_CLASS_START ... ClassConstants.INTERNAL_TYPE_CLASS_END, or
an array type containing any of these types (always as String).public boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||