proguard.evaluation.value
Class InstructionOffsetValue

java.lang.Object
  extended by proguard.evaluation.value.Value
      extended by proguard.evaluation.value.Category1Value
          extended by proguard.evaluation.value.InstructionOffsetValue

public class InstructionOffsetValue
extends Category1Value

This class represents a partially evaluated instruction offset. It can contain 0 or more specific instruction offsets.


Field Summary
static InstructionOffsetValue EMPTY_VALUE
           
 
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
InstructionOffsetValue(int value)
           
InstructionOffsetValue(int[] values)
           
 
Method Summary
 int computationalType()
          Returns the computational type of this Value.
 boolean contains(int value)
          Returns whether the given value is present in this list of instruction offsets.
 boolean equals(java.lang.Object object)
           
 Value generalize(InstructionOffsetValue other)
          Returns the generalization of this InstructionOffsetValue and the given other InstructionOffsetValue.
 Value generalize(Value other)
          Returns the generalization of this Value and the given other Value.
 int hashCode()
           
 int instructionOffset(int index)
           
 int instructionOffsetCount()
           
 InstructionOffsetValue instructionOffsetValue()
          Returns this Value as an InstructionOffsetValue.
 java.lang.String internalType()
          Returns the internal type of this Value.
 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.
 int maximumValue()
          Returns the maximum value from this list of instruction offsets.
 int minimumValue()
          Returns the minimum value from this list of instruction offsets.
 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, integerValue, longValue, referenceValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY_VALUE

public static final InstructionOffsetValue EMPTY_VALUE
Constructor Detail

InstructionOffsetValue

public InstructionOffsetValue(int value)

InstructionOffsetValue

public InstructionOffsetValue(int[] values)
Method Detail

instructionOffsetCount

public int instructionOffsetCount()

instructionOffset

public int instructionOffset(int index)

contains

public boolean contains(int value)
Returns whether the given value is present in this list of instruction offsets.


minimumValue

public int minimumValue()
Returns the minimum value from this list of instruction offsets. Returns Integer.MAX_VALUE if the list is empty.


maximumValue

public int maximumValue()
Returns the maximum value from this list of instruction offsets. Returns Integer.MIN_VALUE if the list is empty.


generalize

public final Value generalize(InstructionOffsetValue other)
Returns the generalization of this InstructionOffsetValue and the given other InstructionOffsetValue. The values of the other InstructionOffsetValue are guaranteed to remain at the end of the list, in the same order.


instructionOffsetValue

public final InstructionOffsetValue instructionOffsetValue()
Description copied from class: Value
Returns this Value as an InstructionOffsetValue.

Overrides:
instructionOffsetValue in class Value

isSpecific

public boolean isSpecific()
Description copied from class: Value
Returns whether this Value represents a single specific (but possibly unknown) value.

Overrides:
isSpecific in class Value

isParticular

public boolean isParticular()
Description copied from class: Value
Returns whether this Value represents a single particular (known) value.

Overrides:
isParticular 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.

Specified by:
computationalType in class Value
Returns:
TYPE_INTEGER, TYPE_LONG, TYPE_FLOAT, TYPE_DOUBLE, TYPE_REFERENCE, or TYPE_INSTRUCTION_OFFSET.

internalType

public final java.lang.String internalType()
Description copied from class: Value
Returns the internal type of this Value.

Specified by:
internalType in class Value
Returns:
ClassConstants.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).

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object