proguard.evaluation.value
Class ValueFactory

java.lang.Object
  extended by proguard.evaluation.value.ValueFactory
Direct Known Subclasses:
SpecificValueFactory

public class ValueFactory
extends java.lang.Object

This class provides methods to create and reuse Value objects.


Constructor Summary
ValueFactory()
           
 
Method Summary
 ReferenceValue createArrayReferenceValue(java.lang.String type, Clazz referencedClass, IntegerValue arrayLength)
          Creates a new ReferenceValue for arrays of the given type and length.
 ReferenceValue createArrayReferenceValue(java.lang.String type, Clazz referencedClass, IntegerValue arrayLength, Value elementValue)
          Creates a new ReferenceValue for arrays of the given type and length, containing the given element.
 DoubleValue createDoubleValue()
          Creates a new DoubleValue with an undefined value.
 DoubleValue createDoubleValue(double value)
          Creates a new DoubleValue with a given particular value.
 FloatValue createFloatValue()
          Creates a new FloatValue with an undefined value.
 FloatValue createFloatValue(float value)
          Creates a new FloatValue with a given particular value.
 IntegerValue createIntegerValue()
          Creates a new IntegerValue with an undefined value.
 IntegerValue createIntegerValue(int value)
          Creates a new IntegerValue with a given particular value.
 LongValue createLongValue()
          Creates a new LongValue with an undefined value.
 LongValue createLongValue(long value)
          Creates a new LongValue with a given particular value.
 ReferenceValue createReferenceValue(java.lang.String type, Clazz referencedClass, boolean mayBeNull)
          Creates a new ReferenceValue of the given type.
 ReferenceValue createReferenceValueNull()
          Creates a new ReferenceValue that represents null.
 Value createValue(java.lang.String type, Clazz referencedClass, boolean mayBeNull)
          Creates a new Value of the given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueFactory

public ValueFactory()
Method Detail

createValue

public Value createValue(java.lang.String type,
                         Clazz referencedClass,
                         boolean mayBeNull)
Creates a new Value of the given type. The type must be a fully specified internal type for primitives, classes, or arrays.


createIntegerValue

public IntegerValue createIntegerValue()
Creates a new IntegerValue with an undefined value.


createIntegerValue

public IntegerValue createIntegerValue(int value)
Creates a new IntegerValue with a given particular value.


createLongValue

public LongValue createLongValue()
Creates a new LongValue with an undefined value.


createLongValue

public LongValue createLongValue(long value)
Creates a new LongValue with a given particular value.


createFloatValue

public FloatValue createFloatValue()
Creates a new FloatValue with an undefined value.


createFloatValue

public FloatValue createFloatValue(float value)
Creates a new FloatValue with a given particular value.


createDoubleValue

public DoubleValue createDoubleValue()
Creates a new DoubleValue with an undefined value.


createDoubleValue

public DoubleValue createDoubleValue(double value)
Creates a new DoubleValue with a given particular value.


createReferenceValueNull

public ReferenceValue createReferenceValueNull()
Creates a new ReferenceValue that represents null.


createReferenceValue

public ReferenceValue createReferenceValue(java.lang.String type,
                                           Clazz referencedClass,
                                           boolean mayBeNull)
Creates a new ReferenceValue of the given type. The type must be an internal class name or an array type. If the type is null, the ReferenceValue represents null.


createArrayReferenceValue

public ReferenceValue createArrayReferenceValue(java.lang.String type,
                                                Clazz referencedClass,
                                                IntegerValue arrayLength)
Creates a new ReferenceValue for arrays of the given type and length. The type must be a fully specified internal type for primitives, classes, or arrays.


createArrayReferenceValue

public ReferenceValue createArrayReferenceValue(java.lang.String type,
                                                Clazz referencedClass,
                                                IntegerValue arrayLength,
                                                Value elementValue)
Creates a new ReferenceValue for arrays of the given type and length, containing the given element. The type must be a fully specified internal type for primitives, classes, or arrays.