Package proguard.evaluation.value
Class InstructionOffsetValue
- java.lang.Object
- 
- proguard.evaluation.value.Value
- 
- proguard.evaluation.value.Category1Value
- 
- proguard.evaluation.value.InstructionOffsetValue
 
 
 
- 
 public class InstructionOffsetValue extends Category1Value Representation of a partially evaluated instruction offset. It can contain 0 or more specific instruction offsets. Each instruction offset can be flagged as an ordinary offset, a method parameter, a method return value, a field value, a new instance value, or an exception handler.
- 
- 
Field SummaryFields Modifier and Type Field Description static intCASTstatic InstructionOffsetValueEMPTY_VALUEstatic intEXCEPTION_HANDLERstatic intFIELD_VALUEstatic intINSTRUCTION_OFFSET_MASKstatic intMETHOD_PARAMETERstatic intMETHOD_RETURN_VALUEstatic intNEW_INSTANCE- 
Fields inherited from class proguard.evaluation.value.ValueALWAYS, MAYBE, NEVER, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INSTRUCTION_OFFSET, TYPE_INTEGER, TYPE_LONG, TYPE_REFERENCE, TYPE_TOP, TYPE_UNKNOWN
 
- 
 - 
Constructor SummaryConstructors Constructor Description InstructionOffsetValue(int value)Creates a new InstructionOffsetValue with the given instruction offset.InstructionOffsetValue(int[] values)Creates a new InstructionOffsetValue with the given list of instruction offsets.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description InstructionOffsetValueadd(int value)Returns an InstructionOffsetValue that contains the instructions offsets of this value and the given instruction offset.intcomputationalType()Returns the computational type of this Value.booleancontains(int value)Returns whether the given value is present in this list of instruction offsets.booleanequals(java.lang.Object object)InstructionOffsetValuegeneralize(InstructionOffsetValue other)Returns the generalization of this InstructionOffsetValue and the given other InstructionOffsetValue.Valuegeneralize(Value other)Returns the generalization of this Value and the given other Value.inthashCode()intinstructionOffset(int index)Returns the specified instruction offset of this value.intinstructionOffsetCount()Returns the number of instruction offsets of this value.InstructionOffsetValueinstructionOffsetValue()Returns this Value as an InstructionOffsetValue.java.lang.StringinternalType()Returns the internal type of this Value.booleanisCast(int index)Returns whether the specified instruction offset corresponds to a cast.booleanisExceptionHandler(int index)Returns whether the specified instruction offset corresponds to an exception handler.booleanisFieldValue(int index)Returns whether the specified instruction offset corresponds to a field value.booleanisMethodParameter(int index)Returns whether the specified instruction offset corresponds to a method parameter.booleanisMethodReturnValue(int index)Returns whether the specified instruction offset corresponds to a method return value.booleanisNewinstance(int index)Returns whether the specified instruction offset corresponds to a new instance.booleanisParticular()Returns whether this Value represents a single particular (known) value.booleanisSpecific()Returns whether this Value represents a single specific (but possibly unknown) value.intmaximumValue()Returns the maximum value from this list of instruction offsets.intmethodParameter(int index)Returns the specified method parameter (assuming it is one).intminimumValue()Returns the minimum value from this list of instruction offsets.InstructionOffsetValueremove(int value)Returns an InstructionOffsetValue that contains the instructions offsets of this value but not the given instruction offset.java.lang.StringtoString()- 
Methods inherited from class proguard.evaluation.value.Category1Valuecategory1Value, isCategory2
 - 
Methods inherited from class proguard.evaluation.value.Valuecategory2Value, copyIfMutable, doubleValue, floatValue, integerValue, longValue, referenceValue
 
- 
 
- 
- 
- 
Field Detail- 
EMPTY_VALUEpublic static final InstructionOffsetValue EMPTY_VALUE 
 - 
INSTRUCTION_OFFSET_MASKpublic static final int INSTRUCTION_OFFSET_MASK - See Also:
- Constant Field Values
 
 - 
METHOD_PARAMETERpublic static final int METHOD_PARAMETER - See Also:
- Constant Field Values
 
 - 
METHOD_RETURN_VALUEpublic static final int METHOD_RETURN_VALUE - See Also:
- Constant Field Values
 
 - 
FIELD_VALUEpublic static final int FIELD_VALUE - See Also:
- Constant Field Values
 
 - 
NEW_INSTANCEpublic static final int NEW_INSTANCE - See Also:
- Constant Field Values
 
 - 
CASTpublic static final int CAST - See Also:
- Constant Field Values
 
 - 
EXCEPTION_HANDLERpublic static final int EXCEPTION_HANDLER - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
InstructionOffsetValuepublic InstructionOffsetValue(int value) Creates a new InstructionOffsetValue with the given instruction offset.
 - 
InstructionOffsetValuepublic InstructionOffsetValue(int[] values) Creates a new InstructionOffsetValue with the given list of instruction offsets.
 
- 
 - 
Method Detail- 
instructionOffsetCountpublic int instructionOffsetCount() Returns the number of instruction offsets of this value.
 - 
instructionOffsetpublic int instructionOffset(int index) Returns the specified instruction offset of this value.
 - 
containspublic boolean contains(int value) Returns whether the given value is present in this list of instruction offsets.
 - 
minimumValuepublic int minimumValue() Returns the minimum value from this list of instruction offsets. ReturnsInteger.MAX_VALUEif the list is empty.
 - 
maximumValuepublic int maximumValue() Returns the maximum value from this list of instruction offsets. ReturnsInteger.MIN_VALUEif the list is empty.
 - 
isMethodParameterpublic boolean isMethodParameter(int index) Returns whether the specified instruction offset corresponds to a method parameter.
 - 
methodParameterpublic int methodParameter(int index) Returns the specified method parameter (assuming it is one).
 - 
isMethodReturnValuepublic boolean isMethodReturnValue(int index) Returns whether the specified instruction offset corresponds to a method return value.
 - 
isFieldValuepublic boolean isFieldValue(int index) Returns whether the specified instruction offset corresponds to a field value.
 - 
isNewinstancepublic boolean isNewinstance(int index) Returns whether the specified instruction offset corresponds to a new instance.
 - 
isCastpublic boolean isCast(int index) Returns whether the specified instruction offset corresponds to a cast.
 - 
isExceptionHandlerpublic boolean isExceptionHandler(int index) Returns whether the specified instruction offset corresponds to an exception handler.
 - 
addpublic InstructionOffsetValue add(int value) Returns an InstructionOffsetValue that contains the instructions offsets of this value and the given instruction offset.
 - 
removepublic InstructionOffsetValue remove(int value) Returns an InstructionOffsetValue that contains the instructions offsets of this value but not the given instruction offset.
 - 
generalizepublic final InstructionOffsetValue 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.
 - 
instructionOffsetValuepublic final InstructionOffsetValue instructionOffsetValue() Description copied from class:ValueReturns this Value as an InstructionOffsetValue.- Overrides:
- instructionOffsetValuein class- Value
 
 - 
isSpecificpublic boolean isSpecific() Description copied from class:ValueReturns whether this Value represents a single specific (but possibly unknown) value.- Overrides:
- isSpecificin class- Value
 
 - 
isParticularpublic boolean isParticular() Description copied from class:ValueReturns whether this Value represents a single particular (known) value.- Overrides:
- isParticularin class- Value
 
 - 
generalizepublic final Value generalize(Value other) Description copied from class:ValueReturns the generalization of this Value and the given other Value.- Specified by:
- generalizein class- Value
 
 - 
computationalTypepublic final int computationalType() Description copied from class:ValueReturns the computational type of this Value.- Specified by:
- computationalTypein class- Value
- Returns:
- TYPE_INTEGER,- TYPE_LONG,- TYPE_FLOAT,- TYPE_DOUBLE,- TYPE_REFERENCE, or- TYPE_INSTRUCTION_OFFSET.
 
 - 
internalTypepublic final java.lang.String internalType() Description copied from class:ValueReturns the internal type of this Value.- Specified by:
- internalTypein class- Value
- Returns:
- TypeConstants.BOOLEAN,- TypeConstants.BYTE,- TypeConstants.CHAR,- TypeConstants.SHORT,- TypeConstants.INT,- TypeConstants.LONG,- TypeConstants.FLOAT,- TypeConstants.DOUBLE,- TypeConstants.CLASS_START ... TypeConstants.CLASS_END, or an array type containing any of these types (always as String).
 
 - 
equalspublic boolean equals(java.lang.Object object) - Overrides:
- equalsin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-