public class BasicValueFactory extends java.lang.Object implements ValueFactory
| Modifier and Type | Field and Description |
|---|---|
static DoubleValue |
DOUBLE_VALUE |
static FloatValue |
FLOAT_VALUE |
static IntegerValue |
INTEGER_VALUE |
static LongValue |
LONG_VALUE |
static ReferenceValue |
REFERENCE_VALUE |
static UnknownValue |
UNKNOWN_VALUE |
| Constructor and Description |
|---|
BasicValueFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
checkCreationLocation(CodeLocation creationLocation) |
protected static void |
checkReferenceValue(AnalyzedObject value) |
ReferenceValue |
createArrayReferenceValue(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.
|
ReferenceValue |
createArrayReferenceValue(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.
|
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.
|
IntegerValue |
createIntegerValue(int min,
int max)
Creates a new IntegerValue with a given possible range.
|
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()
Creates a new ReferenceValue of an undefined type.
|
ReferenceValue |
createReferenceValue(Clazz referencedClass,
boolean mayBeExtension,
boolean mayBeNull,
@NotNull AnalyzedObject value)
Creates a new ReferenceValue that represents the given type.
|
ReferenceValue |
createReferenceValue(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.
|
ReferenceValue |
createReferenceValue(java.lang.String type,
Clazz referencedClass,
boolean mayBeExtension,
boolean mayBeNull)
Creates a new ReferenceValue that represents the given type.
|
ReferenceValue |
createReferenceValue(java.lang.String type,
Clazz referencedClass,
boolean mayBeExtension,
boolean mayBeNull,
Clazz creationClass,
Method creationMethod,
int creationOffset)
Deprecated.
|
ReferenceValue |
createReferenceValue(java.lang.String type,
Clazz referencedClass,
boolean mayBeExtension,
boolean mayBeNull,
Clazz creationClass,
Method creationMethod,
int creationOffset,
java.lang.Object value)
Deprecated.
|
ReferenceValue |
createReferenceValue(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.
|
ReferenceValue |
createReferenceValue(java.lang.String type,
Clazz referencedClass,
boolean mayBeExtension,
boolean mayBeNull,
java.lang.Object value)
Deprecated.
|
ReferenceValue |
createReferenceValueForId(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.
|
ReferenceValue |
createReferenceValueForId(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.
|
ReferenceValue |
createReferenceValueForId(java.lang.String type,
Clazz referencedClass,
boolean mayBeExtension,
boolean mayBeNull,
java.lang.Object id,
java.lang.Object value)
Deprecated.
|
ReferenceValue |
createReferenceValueNull()
Creates a new ReferenceValue that represents
null. |
Value |
createValue(java.lang.String type,
Clazz referencedClass,
boolean mayBeExtension,
boolean mayBeNull)
Creates a new Value of the given type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateReferenceValue, createReferenceValue, createReferenceValuepublic static final UnknownValue UNKNOWN_VALUE
public static final IntegerValue INTEGER_VALUE
public static final LongValue LONG_VALUE
public static final FloatValue FLOAT_VALUE
public static final DoubleValue DOUBLE_VALUE
public static final ReferenceValue REFERENCE_VALUE
public Value createValue(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull)
ValueFactorycreateValue in interface ValueFactorypublic IntegerValue createIntegerValue()
ValueFactorycreateIntegerValue in interface ValueFactorypublic IntegerValue createIntegerValue(int value)
ValueFactorycreateIntegerValue in interface ValueFactorypublic IntegerValue createIntegerValue(int min, int max)
ValueFactorycreateIntegerValue in interface ValueFactorypublic LongValue createLongValue()
ValueFactorycreateLongValue in interface ValueFactorypublic LongValue createLongValue(long value)
ValueFactorycreateLongValue in interface ValueFactorypublic FloatValue createFloatValue()
ValueFactorycreateFloatValue in interface ValueFactorypublic FloatValue createFloatValue(float value)
ValueFactorycreateFloatValue in interface ValueFactorypublic DoubleValue createDoubleValue()
ValueFactorycreateDoubleValue in interface ValueFactorypublic DoubleValue createDoubleValue(double value)
ValueFactorycreateDoubleValue in interface ValueFactorypublic ReferenceValue createReferenceValue()
ValueFactorycreateReferenceValue in interface ValueFactorypublic ReferenceValue createReferenceValueNull()
ValueFactorynull.createReferenceValueNull in interface ValueFactorypublic ReferenceValue createReferenceValue(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull)
ValueFactorynull, the ReferenceValue represents
null.createReferenceValue in interface ValueFactory@Deprecated public ReferenceValue createReferenceValue(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, java.lang.Object value)
createReferenceValue(Clazz, boolean, boolean,
AnalyzedObject).createReferenceValue in interface ValueFactorypublic ReferenceValue createReferenceValue(Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, @NotNull @NotNull AnalyzedObject value)
ValueFactorynull, the ReferenceValue represents
null.
The object wrapped by AnalyzedObject is either the value of the reference during
execution or a Model of it.
createReferenceValue in interface ValueFactory@Deprecated public ReferenceValue createReferenceValue(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, Clazz creationClass, Method creationMethod, int creationOffset)
createReferenceValue in interface ValueFactorypublic ReferenceValue createReferenceValue(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, CodeLocation creationLocation)
ValueFactorynull
, the ReferenceValue represents null.createReferenceValue in interface ValueFactory@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 in interface ValueFactorypublic ReferenceValue createReferenceValue(Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, CodeLocation creationLocation, @NotNull @NotNull AnalyzedObject value)
ValueFactorynull
, the ReferenceValue represents null.
The object wrapped by AnalyzedObject is either the value of the reference during
execution or a Model of it.
createReferenceValue in interface ValueFactorypublic ReferenceValue createReferenceValueForId(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, java.lang.Object id)
ValueFactorynull, the
ReferenceValue represents null.createReferenceValueForId in interface ValueFactory@Deprecated public ReferenceValue createReferenceValueForId(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, java.lang.Object id, java.lang.Object value)
createReferenceValueForId in interface ValueFactorypublic ReferenceValue createReferenceValueForId(Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, java.lang.Object id, @NotNull @NotNull AnalyzedObject value)
ValueFactorynull, the
ReferenceValue represents null.
The object wrapped by AnalyzedObject is either the value of the reference during
execution or a Model of it.
createReferenceValueForId in interface ValueFactorypublic ReferenceValue createArrayReferenceValue(java.lang.String type, Clazz referencedClass, IntegerValue arrayLength)
ValueFactorycreateArrayReferenceValue in interface ValueFactorypublic ReferenceValue createArrayReferenceValue(java.lang.String type, Clazz referencedClass, IntegerValue arrayLength, java.lang.Object elementValues)
ValueFactorycreateArrayReferenceValue in interface ValueFactoryprotected static void checkReferenceValue(AnalyzedObject value)
protected static void checkCreationLocation(CodeLocation creationLocation)