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)
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,
Clazz creationClass,
Method creationMethod,
int creationOffset,
java.lang.Object value)
Deprecated.
|
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, wait
createReferenceValue, createReferenceValue, createReferenceValue
public 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)
ValueFactory
createValue
in interface ValueFactory
public IntegerValue createIntegerValue()
ValueFactory
createIntegerValue
in interface ValueFactory
public IntegerValue createIntegerValue(int value)
ValueFactory
createIntegerValue
in interface ValueFactory
public IntegerValue createIntegerValue(int min, int max)
ValueFactory
createIntegerValue
in interface ValueFactory
public LongValue createLongValue()
ValueFactory
createLongValue
in interface ValueFactory
public LongValue createLongValue(long value)
ValueFactory
createLongValue
in interface ValueFactory
public FloatValue createFloatValue()
ValueFactory
createFloatValue
in interface ValueFactory
public FloatValue createFloatValue(float value)
ValueFactory
createFloatValue
in interface ValueFactory
public DoubleValue createDoubleValue()
ValueFactory
createDoubleValue
in interface ValueFactory
public DoubleValue createDoubleValue(double value)
ValueFactory
createDoubleValue
in interface ValueFactory
public ReferenceValue createReferenceValue()
ValueFactory
createReferenceValue
in interface ValueFactory
public ReferenceValue createReferenceValueNull()
ValueFactory
null
.createReferenceValueNull
in interface ValueFactory
public ReferenceValue createReferenceValue(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull)
ValueFactory
null
, 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 ValueFactory
public ReferenceValue createReferenceValue(Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, @NotNull @NotNull AnalyzedObject value)
ValueFactory
null
, 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
public ReferenceValue createReferenceValue(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, Clazz creationClass, Method creationMethod, int creationOffset)
ValueFactory
null
, 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 ValueFactory
public ReferenceValue createReferenceValue(Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, CodeLocation creationLocation, @NotNull @NotNull AnalyzedObject value)
ValueFactory
null
, 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
public ReferenceValue createReferenceValueForId(java.lang.String type, Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, java.lang.Object id)
ValueFactory
null
, 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 ValueFactory
public ReferenceValue createReferenceValueForId(Clazz referencedClass, boolean mayBeExtension, boolean mayBeNull, java.lang.Object id, @NotNull @NotNull AnalyzedObject value)
ValueFactory
null
, 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 ValueFactory
public ReferenceValue createArrayReferenceValue(java.lang.String type, Clazz referencedClass, IntegerValue arrayLength)
ValueFactory
createArrayReferenceValue
in interface ValueFactory
public ReferenceValue createArrayReferenceValue(java.lang.String type, Clazz referencedClass, IntegerValue arrayLength, java.lang.Object elementValues)
ValueFactory
createArrayReferenceValue
in interface ValueFactory
protected static void checkReferenceValue(AnalyzedObject value)
protected static void checkCreationLocation(CodeLocation creationLocation)