Class StorageValueModel

java.lang.Object
io.hotmoka.network.values.StorageValueModel

public class StorageValueModel extends Object
The model of a storage value.
  • Field Details

    • value

      public String value
      Used for primitive values, big integers, strings and null. For the null value, this field holds exactly null, not the string "null".
    • reference

      public StorageReferenceModel reference
      Used for storage references.
    • type

      public String type
      The type of the value. For storage references and null, this is "reference".
    • enumElementName

      public String enumElementName
      Used for enumeration values only: it is the name of the element in the enumeration.
  • Constructor Details

    • StorageValueModel

      public StorageValueModel(StorageValue parent)
      Builds the model of a storage value.
      Parameters:
      parent - the storage value
    • StorageValueModel

      public StorageValueModel()
  • Method Details

    • toBean

      public StorageValue 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 to null.
      Parameters:
      request - the request that calls the method
      returnedValue - the value returned by the method
      Returns:
      the