ProGuard

proguard.optimize.evaluation.value
Class ReferenceValue

java.lang.Object
  extended byproguard.optimize.evaluation.value.Value
      extended byproguard.optimize.evaluation.value.Category1Value
          extended byproguard.optimize.evaluation.value.ReferenceValue

public class ReferenceValue
extends proguard.optimize.evaluation.value.Category1Value

This class represents a partially evaluated reference value.


Field Summary
protected  boolean mayBeNull
           
 
Fields inherited from class proguard.optimize.evaluation.value.Value
ALWAYS, MAYBE, NEVER, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INSTRUCTION_OFFSET, TYPE_INTEGER, TYPE_LONG, TYPE_REFERENCE
 
Constructor Summary
ReferenceValue(boolean mayBeNull)
          Creates a new reference value that may or may not be null.
 
Method Summary
 proguard.optimize.evaluation.value.Category1Value category1Value()
          Returns this Value as a Category1Value.
 int computationalType()
          Returns the computational type of this Value.
 int dimension()
          Returns the array dimension, if applicable.
 int equal(ReferenceValue other)
          Returns whether this ReferenceValue and the given ReferenceValue are equal: NEVER, MAYBE, or ALWAYS.
 int equal(proguard.optimize.evaluation.value.SpecificReferenceValue other)
          Returns whether this ReferenceValue and the given SpecificReferenceValue are equal: NEVER, MAYBE, or ALWAYS.
 boolean equals(Object object)
           
 ReferenceValue generalize(ReferenceValue other)
          Returns the generalization of this ReferenceValue and the given other ReferenceValue.
 ReferenceValue generalize(proguard.optimize.evaluation.value.SpecificReferenceValue other)
          Returns the generalization of this ReferenceValue and the given other SpecificReferenceValue.
 Value generalize(Value other)
          Returns the generalization of this Value and the given other Value.
 int hashCode()
           
 int instanceOf(ClassFile typeClassFile, int typeDimension)
          Returns whether this ReferenceValue is an instance of the given class with the given dimensionality: NEVER, MAYBE, or ALWAYS.
 boolean isCategory2()
          Returns whether the computational type of this Value is a category 2 type.
 int isNotNull()
          Returns whether this ReferenceValue is not null: NEVER, MAYBE, or ALWAYS.
 int isNull()
          Returns whether this ReferenceValue is null: NEVER, MAYBE, or ALWAYS.
 int notEqual(ReferenceValue other)
          Returns whether this ReferenceValue and the given ReferenceValue are different: NEVER, MAYBE, or ALWAYS.
 ReferenceValue referenceValue()
          Returns this Value as a ReferenceValue.
 String toString()
           
 ClassFile value()
          Returns the specific reference value, if applicable.
 
Methods inherited from class proguard.optimize.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

mayBeNull

protected boolean mayBeNull
Constructor Detail

ReferenceValue

public ReferenceValue(boolean mayBeNull)
Creates a new reference value that may or may not be null.

Method Detail

value

public ClassFile value()
Returns the specific reference value, if applicable.


dimension

public int dimension()
Returns the array dimension, if applicable.


generalize

public ReferenceValue generalize(ReferenceValue other)
Returns the generalization of this ReferenceValue and the given other ReferenceValue.


equal

public int equal(ReferenceValue other)
Returns whether this ReferenceValue and the given ReferenceValue are equal: NEVER, MAYBE, or ALWAYS.


isNull

public int isNull()
Returns whether this ReferenceValue is null: NEVER, MAYBE, or ALWAYS.


instanceOf

public int instanceOf(ClassFile typeClassFile,
                      int typeDimension)
Returns whether this ReferenceValue is an instance of the given class with the given dimensionality: NEVER, MAYBE, or ALWAYS.


notEqual

public final int notEqual(ReferenceValue other)
Returns whether this ReferenceValue and the given ReferenceValue are different: NEVER, MAYBE, or ALWAYS.


isNotNull

public final int isNotNull()
Returns whether this ReferenceValue is not null: NEVER, MAYBE, or ALWAYS.


generalize

public ReferenceValue generalize(proguard.optimize.evaluation.value.SpecificReferenceValue other)
Returns the generalization of this ReferenceValue and the given other SpecificReferenceValue.


equal

public int equal(proguard.optimize.evaluation.value.SpecificReferenceValue other)
Returns whether this ReferenceValue and the given SpecificReferenceValue are equal: NEVER, MAYBE, or ALWAYS.


referenceValue

public final ReferenceValue referenceValue()
Description copied from class: Value
Returns this Value as a ReferenceValue.

Overrides:
referenceValue in class Value

generalize

public final Value generalize(Value other)
Description copied from class: Value
Returns the generalization of this Value and the given other Value.

Specified by:
generalize in class Value

computationalType

public final int computationalType()
Description copied from class: Value
Returns the computational type of this Value. The type is one of

Specified by:
computationalType in class Value

equals

public boolean equals(Object object)

hashCode

public int hashCode()

toString

public String toString()

category1Value

public final proguard.optimize.evaluation.value.Category1Value category1Value()
Description copied from class: Value
Returns this Value as a Category1Value.

Overrides:
category1Value in class Value

isCategory2

public final boolean isCategory2()
Description copied from class: Value
Returns whether the computational type of this Value is a category 2 type. This means that it takes up the space of two category 1 types on the stack, for instance.

Specified by:
isCategory2 in class Value

ProGuard