Package proguard.evaluation.value
Class ParticularValueFactory
- java.lang.Object
-
- proguard.evaluation.value.BasicValueFactory
-
- proguard.evaluation.value.ParticularValueFactory
-
- All Implemented Interfaces:
ValueFactory
- Direct Known Subclasses:
BasicRangeValueFactory,IdentifiedValueFactory
public class ParticularValueFactory extends BasicValueFactory implements ValueFactory
This class provides methods to create and reuse Value instances that have particular values, whenever they are known.
-
-
Field Summary
Fields Modifier and Type Field Description protected ValueFactoryreferenceValueFactory-
Fields inherited from class proguard.evaluation.value.BasicValueFactory
DOUBLE_VALUE, FLOAT_VALUE, INTEGER_VALUE, LONG_VALUE, REFERENCE_VALUE, UNKNOWN_VALUE
-
-
Constructor Summary
Constructors Constructor Description ParticularValueFactory()Creates a new ParticularValueFactory which does not keep track of particular references.ParticularValueFactory(ValueFactory referenceValueFactory)Creates a new ParticularValueFactory, which uses the given valuefactory for both array and non-array reference construction.ParticularValueFactory(ValueFactory arrayReferenceValueFactory, ValueFactory referenceValueFactory)Creates a new ParticularValueFactory.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description 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 a non-null array with elements of the given type, with the given length and initial element values.DoubleValuecreateDoubleValue(double value)Creates a new DoubleValue with a given particular value.FloatValuecreateFloatValue(float value)Creates a new FloatValue with a given particular value.IntegerValuecreateIntegerValue(int value)Creates a new IntegerValue with a given particular 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)Deprecated.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)Deprecated.ReferenceValuecreateReferenceValue(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, Clazz creationClass, Method creationMethod, int creationOffset, java.lang.Object value)Deprecated.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)Deprecated.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.-
Methods inherited from class proguard.evaluation.value.BasicValueFactory
checkCreationLocation, checkReferenceValue, createDoubleValue, createFloatValue, createIntegerValue, createIntegerValue, createLongValue, createValue
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface proguard.evaluation.value.ValueFactory
createDoubleValue, createFloatValue, createIntegerValue, createIntegerValue, createLongValue, createReferenceValue, createReferenceValue, createReferenceValue, createValue
-
-
-
-
Field Detail
-
referenceValueFactory
protected final ValueFactory referenceValueFactory
-
-
Constructor Detail
-
ParticularValueFactory
public ParticularValueFactory()
Creates a new ParticularValueFactory which does not keep track of particular references.
-
ParticularValueFactory
public ParticularValueFactory(ValueFactory referenceValueFactory)
Creates a new ParticularValueFactory, which uses the given valuefactory for both array and non-array reference construction.
-
ParticularValueFactory
public ParticularValueFactory(ValueFactory arrayReferenceValueFactory, ValueFactory referenceValueFactory)
Creates a new ParticularValueFactory.- Parameters:
arrayReferenceValueFactory- the valuefactory to delegate new array references to.referenceValueFactory- the valuefactory to delegate new references to.
-
-
Method Detail
-
createIntegerValue
public IntegerValue createIntegerValue(int value)
Description copied from interface:ValueFactoryCreates a new IntegerValue with a given particular value.- Specified by:
createIntegerValuein interfaceValueFactory- Overrides:
createIntegerValuein classBasicValueFactory
-
createLongValue
public LongValue createLongValue(long value)
Description copied from interface:ValueFactoryCreates a new LongValue with a given particular value.- Specified by:
createLongValuein interfaceValueFactory- Overrides:
createLongValuein classBasicValueFactory
-
createFloatValue
public FloatValue createFloatValue(float value)
Description copied from interface:ValueFactoryCreates a new FloatValue with a given particular value.- Specified by:
createFloatValuein interfaceValueFactory- Overrides:
createFloatValuein classBasicValueFactory
-
createDoubleValue
public DoubleValue createDoubleValue(double value)
Description copied from interface:ValueFactoryCreates a new DoubleValue with a given particular value.- Specified by:
createDoubleValuein interfaceValueFactory- Overrides:
createDoubleValuein classBasicValueFactory
-
createReferenceValue
public ReferenceValue createReferenceValue()
Description copied from interface:ValueFactoryCreates a new ReferenceValue of an undefined type.- Specified by:
createReferenceValuein interfaceValueFactory- Overrides:
createReferenceValuein classBasicValueFactory
-
createReferenceValueNull
public ReferenceValue createReferenceValueNull()
Description copied from interface:ValueFactoryCreates a new ReferenceValue that representsnull.- Specified by:
createReferenceValueNullin interfaceValueFactory- Overrides:
createReferenceValueNullin classBasicValueFactory
-
createReferenceValue
public ReferenceValue createReferenceValue(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull)
Description copied from interface: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.- Specified by:
createReferenceValuein interfaceValueFactory- Overrides:
createReferenceValuein classBasicValueFactory
-
createReferenceValue
@Deprecated public ReferenceValue createReferenceValue(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, java.lang.Object value)
Deprecated.Deprecated, usecreateReferenceValue(Clazz, boolean, boolean, AnalyzedObject).- Specified by:
createReferenceValuein interfaceValueFactory- Overrides:
createReferenceValuein classBasicValueFactory
-
createReferenceValue
public ReferenceValue createReferenceValue(Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, @NotNull @NotNull AnalyzedObject value)
Description copied from interface: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.- Specified by:
createReferenceValuein interfaceValueFactory- Overrides:
createReferenceValuein classBasicValueFactory
-
createReferenceValue
@Deprecated public ReferenceValue createReferenceValue(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, Clazz creationClass, Method creationMethod, int creationOffset)
Deprecated.- Specified by:
createReferenceValuein interfaceValueFactory- Overrides:
createReferenceValuein classBasicValueFactory
-
createReferenceValue
public ReferenceValue createReferenceValue(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, CodeLocation creationLocation)
Description copied from interface: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.- Specified by:
createReferenceValuein interfaceValueFactory- Overrides:
createReferenceValuein classBasicValueFactory
-
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)
Deprecated.- Specified by:
createReferenceValuein interfaceValueFactory- Overrides:
createReferenceValuein classBasicValueFactory
-
createReferenceValue
public ReferenceValue createReferenceValue(Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, CodeLocation creationLocation, @NotNull @NotNull AnalyzedObject value)
Description copied from interface: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.- Specified by:
createReferenceValuein interfaceValueFactory- Overrides:
createReferenceValuein classBasicValueFactory
-
createReferenceValueForId
@Deprecated public ReferenceValue createReferenceValueForId(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, java.lang.Object id, java.lang.Object value)
Deprecated.- Specified by:
createReferenceValueForIdin interfaceValueFactory- Overrides:
createReferenceValueForIdin classBasicValueFactory
-
createReferenceValueForId
public ReferenceValue createReferenceValueForId(Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, java.lang.Object id, @NotNull @NotNull AnalyzedObject value)
Description copied from interface: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.- Specified by:
createReferenceValueForIdin interfaceValueFactory- Overrides:
createReferenceValueForIdin classBasicValueFactory
-
createReferenceValueForId
public ReferenceValue createReferenceValueForId(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, java.lang.Object id)
Description copied from interface: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.- Specified by:
createReferenceValueForIdin interfaceValueFactory- Overrides:
createReferenceValueForIdin classBasicValueFactory
-
createArrayReferenceValue
public ReferenceValue createArrayReferenceValue(java.lang.String type, Clazz referencedClass, IntegerValue arrayLength)
Description copied from interface:ValueFactoryCreates a new ReferenceValue that represents a non-null array with elements of the given type, with the given length.- Specified by:
createArrayReferenceValuein interfaceValueFactory- Overrides:
createArrayReferenceValuein classBasicValueFactory
-
createArrayReferenceValue
public ReferenceValue createArrayReferenceValue(java.lang.String type, Clazz referencedClass, IntegerValue arrayLength, java.lang.Object elementValues)
Description copied from interface:ValueFactoryCreates a new ReferenceValue that represents a non-null array with elements of the given type, with the given length and initial element values.- Specified by:
createArrayReferenceValuein interfaceValueFactory- Overrides:
createArrayReferenceValuein classBasicValueFactory
-
-