java.lang.Object
io.hotmoka.network.values.StorageValueModel
The model of a storage value.
-
Field Summary
FieldsModifier and TypeFieldDescriptionUsed for enumeration values only: it is the name of the element in the enumeration.Used for storage references.The type of the value.Used for primitive values, big integers, strings and null. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StorageValueModelmodelOfValueReturned(MethodCallTransactionRequestModel request, StorageValue returnedValue) Yields the storage value model of the returned value of a method.toBean()Yields the storage value corresponding to this value.
-
Field Details
-
value
Used for primitive values, big integers, strings and null. For the null value, this field holds exactly null, not the string "null". -
reference
Used for storage references. -
type
The type of the value. For storage references andnull, this is"reference". -
enumElementName
Used for enumeration values only: it is the name of the element in the enumeration.
-
-
Constructor Details
-
StorageValueModel
Builds the model of a storage value.- Parameters:
parent- the storage value
-
StorageValueModel
public StorageValueModel()
-
-
Method Details
-
toBean
Yields the storage value corresponding to this value.- Returns:
- the storage value
-
modelOfValueReturned
public static StorageValueModel modelOfValueReturned(MethodCallTransactionRequestModel request, StorageValue returnedValue) Yields the storage value model of the returned value of a method. If the method returns void, its returned value is irrelevant and we fix it tonull.- Parameters:
request- the request that calls the methodreturnedValue- the value returned by the method- Returns:
- the
-