Interface EngineClassLoader

  • All Superinterfaces:
    ResolvingClassLoader, TakamakaClassLoader

    public interface EngineClassLoader
    extends 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 Detail

      • 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 val)ue 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