Interface EngineClassLoader

All Superinterfaces:
io.hotmoka.whitelisting.api.ResolvingClassLoader, io.hotmoka.verification.api.TakamakaClassLoader

public interface EngineClassLoader extends io.hotmoka.verification.api.TakamakaClassLoader
A class loader used to access the definition of the classes of Takamaka methods or constructors executed during a transaction. It adds methods that allow one to read or modify deserialized storage objects in RAM during a transaction.
  • Method Summary

    Modifier and Type
    Method
    Description
    Yields the value of the balance field of the given contract in RAM.
    boolean
    Yields the value of the boolean inStorage field of the given storage object in RAM.
    Yields the lengths (in bytes) of the instrumented jars of the classpath and its dependencies used to create this class loader.
    Yields the value of the balanceRed field of the given red/green contract in RAM.
    Yields the value of the storageReference field of the given storage object in RAM.
    Yields the transactions that installed the jars of the classpath and its dependencies used to create this class loader.
    void
    Adds the given amount of coins to the current amount of the validators set of the node.
    void
    setBalanceOf(Object object, BigInteger value)
    Sets the value of the balance field of the given contract in RAM.
    void
    setNonceOf(Object object, BigInteger value)
    Sets the value of the nonce field of the given account in RAM.
    void
    Sets the value of the balanceRed field of the given red/green contract in RAM.
    Yields the transaction reference that installed the jar where the given class is defined.

    Methods inherited from interface io.hotmoka.whitelisting.api.ResolvingClassLoader

    getJavaClassLoader, getVerificationVersion, getWhiteListingWizard, loadClass, resolveConstructor, resolveConstructor, resolveField, resolveField, resolveInterfaceMethod, resolveInterfaceMethod, resolveMethod, resolveMethod

    Methods inherited from interface io.hotmoka.verification.api.TakamakaClassLoader

    getAbstractValidators, getAccount, getAccountED25519, getAccountQTESLA1, getAccountQTESLA3, getAccountSHA256DSA, getContract, getExternallyOwnedAccount, getGamete, getStorage, isa, isConsensusUpdateEvent, isContract, isEagerlyLoaded, isExported, isGasPriceUpdateEvent, isInflationUpdateEvent, isInterface, isLazilyLoaded, isStorage, isValidatorsUpdateEvent
  • Method Details

    • getLengthsOfJars

      IntStream getLengthsOfJars()
      Yields the lengths (in bytes) of the instrumented jars of the classpath and its dependencies used to create this class loader.
      Returns:
      the lengths
    • getTransactionsOfJars

      Stream<TransactionReference> getTransactionsOfJars()
      Yields the transactions that installed the jars of the classpath and its dependencies used to create this class loader.
      Returns:
      the transactions
    • transactionThatInstalledJarFor

      TransactionReference transactionThatInstalledJarFor(Class<?> clazz)
      Yields the transaction reference that installed the jar where the given class is defined.
      Parameters:
      clazz - the class
      Returns:
      the transaction reference
    • getStorageReferenceOf

      StorageReference getStorageReferenceOf(Object object)
      Yields the value of the storageReference field of the given storage object in RAM.
      Parameters:
      object - the object
      Returns:
      the value of the field
    • getInStorageOf

      boolean getInStorageOf(Object object)
      Yields the value of the boolean inStorage field of the given storage object in RAM.
      Parameters:
      object - the object
      Returns:
      the value of the field
    • getBalanceOf

      BigInteger getBalanceOf(Object object)
      Yields the value of the balance field of the given contract in RAM.
      Parameters:
      object - the contract
      Returns:
      the value of the field
    • getRedBalanceOf

      BigInteger getRedBalanceOf(Object object)
      Yields the value of the balanceRed field of the given red/green contract in RAM.
      Parameters:
      object - the contract
      Returns:
      the value of the field
    • setBalanceOf

      void setBalanceOf(Object object, BigInteger value)
      Sets the value of the balance field of the given contract in RAM.
      Parameters:
      object - the contract
      value - to value to set for the balance of the contract
    • setNonceOf

      void setNonceOf(Object object, BigInteger value)
      Sets the value of the nonce field of the given account in RAM.
      Parameters:
      object - the account
      value - to value to set for the nonce of the account
    • setRedBalanceOf

      void setRedBalanceOf(Object object, BigInteger value)
      Sets the value of the balanceRed field of the given red/green contract in RAM.
      Parameters:
      object - the contract
      value - to value to set for the red balance of the contract
    • increaseCurrentSupply

      void increaseCurrentSupply(Object validators, BigInteger amount)
      Adds the given amount of coins to the current amount of the validators set of the node.
      Parameters:
      validators - the object containing the validators set
      amount - the amount to add (if positive) or remove (if negative)