类 ReferenceTracingValueFactory
- java.lang.Object
-
- proguard.evaluation.ReferenceTracingValueFactory
-
- 所有已实现的接口:
InstructionVisitor,ValueFactory
public class ReferenceTracingValueFactory extends java.lang.Object implements InstructionVisitor, ValueFactory
ThisValueFactorytags newly created reference values so they can be traced throughout the execution of a method.
-
-
构造器概要
构造器 构造器 说明 ReferenceTracingValueFactory(ValueFactory valueFactory)Creates a new ReferenceTracingValueFactory that attaches instruction offset values based on being used as an instruction visitor.ReferenceTracingValueFactory(ValueFactory valueFactory, boolean preserveTraceValueOnCasts)Creates a new ReferenceTracingValueFactory that attaches instruction offset values based on being used as an instruction visitor.
-
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 TracedReferenceValuecast(TracedReferenceValue referenceValue, java.lang.String type, Clazz referencedClass, boolean alwaysCast)Casts a given traced reference value to the given type, either keeping its trace value or setting a new one.ReferenceValuecreateArrayReferenceValue(java.lang.String type, Clazz referencedClass, IntegerValue arrayLength)Creates a new ReferenceValue that represents a non-null array with elements of the given type, with the given length.ReferenceValuecreateArrayReferenceValue(java.lang.String type, Clazz referencedClass, IntegerValue arrayLength, java.lang.Object elementValues)Creates a new ReferenceValue that represents an array with elements of the given type, with the given length and initial element values.DoubleValuecreateDoubleValue()Creates a new DoubleValue with an undefined value.DoubleValuecreateDoubleValue(double value)Creates a new DoubleValue with a given particular value.FloatValuecreateFloatValue()Creates a new FloatValue with an undefined value.FloatValuecreateFloatValue(float value)Creates a new FloatValue with a given particular value.IntegerValuecreateIntegerValue()Creates a new IntegerValue with an undefined value.IntegerValuecreateIntegerValue(int value)Creates a new IntegerValue with a given particular value.IntegerValuecreateIntegerValue(int min, int max)Creates a new IntegerValue with a given possible range.LongValuecreateLongValue()Creates a new LongValue with an undefined value.LongValuecreateLongValue(long value)Creates a new LongValue with a given particular value.ReferenceValuecreateReferenceValue()Creates a new ReferenceValue of an undefined type.ReferenceValuecreateReferenceValue(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull)Creates a new ReferenceValue that represents the given type.ReferenceValuecreateReferenceValue(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, java.lang.Object value)已过时。ReferenceValuecreateReferenceValue(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, CodeLocation creationLocation)Creates a new ReferenceValue that represents the given type, created at the specified code location.ReferenceValuecreateReferenceValue(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, Clazz creationClass, Method creationMethod, int creationOffset)已过时。ReferenceValuecreateReferenceValue(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, Clazz creationClass, Method creationMethod, int creationOffset, java.lang.Object value)已过时。ReferenceValuecreateReferenceValue(Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, @NotNull AnalyzedObject value)Creates a new ReferenceValue that represents the given type.ReferenceValuecreateReferenceValue(Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, CodeLocation creationLocation, @NotNull AnalyzedObject value)Creates a new ReferenceValue that represents the given type, created at the specified code location.ReferenceValuecreateReferenceValueForId(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, java.lang.Object id)Creates a new ReferenceValue that represents the given type with a specified ID.ReferenceValuecreateReferenceValueForId(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, java.lang.Object id, java.lang.Object value)已过时。ReferenceValuecreateReferenceValueForId(Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, java.lang.Object id, @NotNull AnalyzedObject value)Creates a new ReferenceValue that represents the given type with a specified ID.ReferenceValuecreateReferenceValueNull()Creates a new ReferenceValue that representsnull.ValuecreateValue(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull)Creates a new Value of the given type.voidsetTraceValue(Value traceValue)ReferenceValuetrace(ReferenceValue referenceValue)Attaches the current trace value to given reference value.Valuetrace(Value value)Attaches the current trace value to given value, if it is a reference value.voidvisitAnyInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, Instruction instruction)Visits any Instruction instance.voidvisitConstantInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction)voidvisitSimpleInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SimpleInstruction simpleInstruction)-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 proguard.classfile.instruction.visitor.InstructionVisitor
visitAnySwitchInstruction, visitBranchInstruction, visitLookUpSwitchInstruction, visitTableSwitchInstruction, visitVariableInstruction
-
从接口继承的方法 proguard.evaluation.value.ValueFactory
createReferenceValue, createReferenceValue, createReferenceValue
-
-
-
-
构造器详细资料
-
ReferenceTracingValueFactory
public ReferenceTracingValueFactory(ValueFactory valueFactory)
Creates a new ReferenceTracingValueFactory that attaches instruction offset values based on being used as an instruction visitor. This instance preserves trace values in thecast(proguard.evaluation.value.TracedReferenceValue, java.lang.String, proguard.classfile.Clazz, boolean)method.- 参数:
valueFactory- the value factory that creates the actual values.
-
ReferenceTracingValueFactory
public ReferenceTracingValueFactory(ValueFactory valueFactory, boolean preserveTraceValueOnCasts)
Creates a new ReferenceTracingValueFactory that attaches instruction offset values based on being used as an instruction visitor.- 参数:
valueFactory- the value factory that creates the actual values.preserveTraceValueOnCasts- specifies whether to preserve the trace value for reference values that are passed to thecast(proguard.evaluation.value.TracedReferenceValue, java.lang.String, proguard.classfile.Clazz, boolean)method.
-
-
方法详细资料
-
setTraceValue
public void setTraceValue(Value traceValue)
-
cast
public TracedReferenceValue cast(TracedReferenceValue referenceValue, java.lang.String type, Clazz referencedClass, boolean alwaysCast)
Casts a given traced reference value to the given type, either keeping its trace value or setting a new one.
-
visitAnyInstruction
public void visitAnyInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, Instruction instruction)
从接口复制的说明:InstructionVisitorVisits any Instruction instance. The more specific default implementations of this interface delegate to this method.- 指定者:
visitAnyInstruction在接口中InstructionVisitor
-
visitSimpleInstruction
public void visitSimpleInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SimpleInstruction simpleInstruction)
- 指定者:
visitSimpleInstruction在接口中InstructionVisitor
-
visitConstantInstruction
public void visitConstantInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction)
- 指定者:
visitConstantInstruction在接口中InstructionVisitor
-
createValue
public Value createValue(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull)
从接口复制的说明:ValueFactoryCreates a new Value of the given type. The type must be a fully specified internal type for primitives, classes, or arrays.- 指定者:
createValue在接口中ValueFactory
-
createIntegerValue
public IntegerValue createIntegerValue()
从接口复制的说明:ValueFactoryCreates a new IntegerValue with an undefined value.- 指定者:
createIntegerValue在接口中ValueFactory
-
createIntegerValue
public IntegerValue createIntegerValue(int value)
从接口复制的说明:ValueFactoryCreates a new IntegerValue with a given particular value.- 指定者:
createIntegerValue在接口中ValueFactory
-
createIntegerValue
public IntegerValue createIntegerValue(int min, int max)
从接口复制的说明:ValueFactoryCreates a new IntegerValue with a given possible range.- 指定者:
createIntegerValue在接口中ValueFactory
-
createLongValue
public LongValue createLongValue()
从接口复制的说明:ValueFactoryCreates a new LongValue with an undefined value.- 指定者:
createLongValue在接口中ValueFactory
-
createLongValue
public LongValue createLongValue(long value)
从接口复制的说明:ValueFactoryCreates a new LongValue with a given particular value.- 指定者:
createLongValue在接口中ValueFactory
-
createFloatValue
public FloatValue createFloatValue()
从接口复制的说明:ValueFactoryCreates a new FloatValue with an undefined value.- 指定者:
createFloatValue在接口中ValueFactory
-
createFloatValue
public FloatValue createFloatValue(float value)
从接口复制的说明:ValueFactoryCreates a new FloatValue with a given particular value.- 指定者:
createFloatValue在接口中ValueFactory
-
createDoubleValue
public DoubleValue createDoubleValue()
从接口复制的说明:ValueFactoryCreates a new DoubleValue with an undefined value.- 指定者:
createDoubleValue在接口中ValueFactory
-
createDoubleValue
public DoubleValue createDoubleValue(double value)
从接口复制的说明:ValueFactoryCreates a new DoubleValue with a given particular value.- 指定者:
createDoubleValue在接口中ValueFactory
-
createReferenceValue
public ReferenceValue createReferenceValue()
从接口复制的说明:ValueFactoryCreates a new ReferenceValue of an undefined type.- 指定者:
createReferenceValue在接口中ValueFactory
-
createReferenceValueNull
public ReferenceValue createReferenceValueNull()
从接口复制的说明:ValueFactoryCreates a new ReferenceValue that representsnull.- 指定者:
createReferenceValueNull在接口中ValueFactory
-
createReferenceValue
public ReferenceValue createReferenceValue(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull)
从接口复制的说明:ValueFactoryCreates a new ReferenceValue that represents the given type. The type must be an internal class name or an array type. If the type isnull, the ReferenceValue representsnull.- 指定者:
createReferenceValue在接口中ValueFactory
-
createReferenceValue
@Deprecated public ReferenceValue createReferenceValue(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, java.lang.Object value)
已过时。Deprecated, usecreateReferenceValue(Clazz, boolean, boolean, AnalyzedObject).- 指定者:
createReferenceValue在接口中ValueFactory
-
createReferenceValue
public ReferenceValue createReferenceValue(Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, @NotNull @NotNull AnalyzedObject value)
从接口复制的说明:ValueFactoryCreates a new ReferenceValue that represents the given type. The type must be an internal class name or an array type. If the type isnull, the ReferenceValue representsnull.The object wrapped by
AnalyzedObjectis either the value of the reference during execution or aModelof it.- 指定者:
createReferenceValue在接口中ValueFactory
-
createReferenceValue
@Deprecated public ReferenceValue createReferenceValue(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, Clazz creationClass, Method creationMethod, int creationOffset)
已过时。- 指定者:
createReferenceValue在接口中ValueFactory
-
createReferenceValue
public ReferenceValue createReferenceValue(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, CodeLocation creationLocation)
从接口复制的说明:ValueFactoryCreates a new ReferenceValue that represents the given type, created at the specified code location. The type must be an internal class name or an array type. If the type isnull, the ReferenceValue representsnull.- 指定者:
createReferenceValue在接口中ValueFactory
-
createReferenceValue
@Deprecated public ReferenceValue createReferenceValue(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, Clazz creationClass, Method creationMethod, int creationOffset, java.lang.Object value)
已过时。- 指定者:
createReferenceValue在接口中ValueFactory
-
createReferenceValue
public ReferenceValue createReferenceValue(Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, CodeLocation creationLocation, @NotNull @NotNull AnalyzedObject value)
从接口复制的说明:ValueFactoryCreates a new ReferenceValue that represents the given type, created at the specified code location. The type must be an internal class name or an array type. If the type isnull, the ReferenceValue representsnull.The object wrapped by
AnalyzedObjectis either the value of the reference during execution or aModelof it.- 指定者:
createReferenceValue在接口中ValueFactory
-
createReferenceValueForId
public ReferenceValue createReferenceValueForId(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, java.lang.Object id)
从接口复制的说明:ValueFactoryCreates a new ReferenceValue that represents the given type with a specified ID. The type must be an internal class name or an array type. If the type isnull, the ReferenceValue representsnull.- 指定者:
createReferenceValueForId在接口中ValueFactory
-
createReferenceValueForId
@Deprecated public ReferenceValue createReferenceValueForId(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, java.lang.Object id, java.lang.Object value)
已过时。- 指定者:
createReferenceValueForId在接口中ValueFactory
-
createReferenceValueForId
public ReferenceValue createReferenceValueForId(Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, java.lang.Object id, @NotNull @NotNull AnalyzedObject value)
从接口复制的说明:ValueFactoryCreates a new ReferenceValue that represents the given type with a specified ID. The type must be an internal class name or an array type. If the type isnull, the ReferenceValue representsnull.The object wrapped by
AnalyzedObjectis either the value of the reference during execution or aModelof it.- 指定者:
createReferenceValueForId在接口中ValueFactory
-
createArrayReferenceValue
public ReferenceValue createArrayReferenceValue(java.lang.String type, Clazz referencedClass, IntegerValue arrayLength)
从接口复制的说明:ValueFactoryCreates a new ReferenceValue that represents a non-null array with elements of the given type, with the given length.- 指定者:
createArrayReferenceValue在接口中ValueFactory
-
createArrayReferenceValue
public ReferenceValue createArrayReferenceValue(java.lang.String type, Clazz referencedClass, IntegerValue arrayLength, java.lang.Object elementValues)
Creates a new ReferenceValue that represents an array with elements of the given type, with the given length and initial element values.- 指定者:
createArrayReferenceValue在接口中ValueFactory
-
trace
public Value trace(Value value)
Attaches the current trace value to given value, if it is a reference value.
-
trace
public ReferenceValue trace(ReferenceValue referenceValue)
Attaches the current trace value to given reference value.
-
-