Class StorageValueModel


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

      • 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".
      • 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 Detail

      • StorageValueModel

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

        public StorageValueModel()
    • Method Detail

      • 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