|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IValueFactory
A value factory interface.
Method Summary | |
---|---|
IValue |
createDefaultValue(Type type)
Creates a default value of a type. |
int |
getReferenceIdSeed()
Gets the reference id seed. |
Type |
getType(IValue value)
Gets the type of a value. |
IArrayValue |
newArrayValue(ArrayType arrayType,
Type[] fieldTypes,
int[] lengths)
Creates an array value. |
IDoubleValue |
newDoubleValue(double d)
Creates a double value. |
IExpASTValue |
newExpASTValue(Exp exp)
Creates an exp AST value. |
IFloatValue |
newFloatValue(float f)
Creates a float value. |
IIntValue |
newIntValue(int integer)
Creates an integer value. |
IIntValue |
newIntValue(Type type,
int integer)
Creates an integer value. |
ILockValue |
newLockValue()
Creates a new lock value. |
ILongValue |
newLongValue(long l)
Creates a long value. |
ILongValue |
newLongValue(LongType type,
long l)
Creates an integer value. |
INullValue |
newNullValue()
Creates a new null value. |
IRecordValue |
newRecordValue(RecordType recordType)
Creates a new record value. |
int |
newReferenceId()
Generates a new reference id. |
IStringValue |
newStringValue(String s)
Creates a string value. |
IValueArray |
newUniformValueArray(IValue[] values)
Creates a value array from an array of values. |
IValueArray |
newVariedValueArray(IValue[] values)
Creates a value array from an array of values. |
void |
setReferenceIdSeed(int newSeed)
Sets the reference id seed. |
void |
validate(IValue value)
Validates a value. |
void |
validate(IValueArray valueArray)
Validates a value array. |
Methods inherited from interface edu.ksu.cis.projects.bogor.module.IModule |
---|
connect, getCopyrightNotice, setOptions |
Methods inherited from interface edu.ksu.cis.projects.bogor.util.Disposable |
---|
dispose |
Methods inherited from interface edu.ksu.cis.projects.bogor.module.value.event.IValueEventProvider |
---|
getNotifier, getNotifier |
Methods inherited from interface edu.ksu.cis.projects.bogor.module.event.IEventProvider |
---|
backward, forward, getState, getThreadId, isBackward, isForward, removeContext, setContext |
Method Detail |
---|
int newReferenceId()
int getReferenceIdSeed()
void setReferenceIdSeed(int newSeed)
newSeed
- The new seed.Type getType(IValue value)
value
- The value whose type to be retrieved.
Must be non-null.
IValue createDefaultValue(Type type)
type
- The type whose default value to be created.
If the type is a range type that does not include zero in its range,
then the low limit of the range type is the default value.
Must be either a primitive type or a non-primitive type.
IArrayValue newArrayValue(ArrayType arrayType, Type[] fieldTypes, int[] lengths)
arrayType
- The array type whose value to be created.fieldTypes
- The array fields' types. Must be non-null.
Each element must be non-null.lengths
- The lengths of dimensions of the new array.
The number of lenghts must be at most equal to the array rank.
Must contain at least one element.
Each length must be at least zero.
IDoubleValue newDoubleValue(double d)
d
- The double of the double value.
IExpASTValue newExpASTValue(Exp exp)
exp
- The exp AST of the exp AST value. Must be non-null.
IFloatValue newFloatValue(float f)
f
- The float of the float value.
IIntValue newIntValue(Type type, int integer)
type
- The type of this integer.
Must be instance of IntType
or BooleanType
.integer
- The integer of this integer value.
IIntValue newIntValue(int integer)
integer
- The integer of the integer value.
IntType
as its type. Non-null.ILockValue newLockValue()
ILongValue newLongValue(LongType type, long l)
type
- The type of the long value. Must be non-null.l
- The long of the long value.
ILongValue newLongValue(long l)
l
- The long of the long value.
LongType
as its type. Non-null.INullValue newNullValue()
IRecordValue newRecordValue(RecordType recordType)
recordType
- The record type whose value to be created.
Must be non-null.
IStringValue newStringValue(String s)
s
- The string of the string value. Must be non-null.
IValueArray newVariedValueArray(IValue[] values)
values
- The array of values. Must be non-null.
Each element must be non-null.
IValueArray newUniformValueArray(IValue[] values)
values
- The array of values. Must be non-null.
Each element must be non-null. Each element must be of the same type.
void validate(IValue value)
value
- The value to be validated.
Must be non-null.void validate(IValueArray valueArray)
valueArray
- The value array to be validated.
Must be non-null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |