-
- 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BigIntegergetBalanceOf(Object object)Yields the value of thebalancefield of the given contract in RAM.booleangetInStorageOf(Object object)Yields the value of the booleaninStoragefield of the given storage object in RAM.IntStreamgetLengthsOfJars()Yields the lengths (in bytes) of the instrumented jars of the classpath and its dependencies used to create this class loader.BigIntegergetRedBalanceOf(Object object)Yields the value of thebalanceRedfield of the given red/green contract in RAM.StorageReferencegetStorageReferenceOf(Object object)Yields the value of thestorageReferencefield of the given storage object in RAM.Stream<TransactionReference>getTransactionsOfJars()Yields the transactions that installed the jars of the classpath and its dependencies used to create this class loader.voidsetBalanceOf(Object object, BigInteger value)Sets the value of thebalancefield of the given contract in RAM.voidsetNonceOf(Object object, BigInteger value)Sets the value of thenoncefield of the given account in RAM.voidsetRedBalanceOf(Object object, BigInteger value)Sets the val)ue of thebalanceRedfield of the given red/green contract in RAM.TransactionReferencetransactionThatInstalledJarFor(Class<?> clazz)Yields the transaction reference that installed the jar where the given class is defined.-
Methods inherited from interface io.hotmoka.whitelisting.ResolvingClassLoader
getJavaClassLoader, getVerificationVersion, getWhiteListingWizard, loadClass, resolveConstructor, resolveConstructor, resolveField, resolveField, resolveInterfaceMethod, resolveInterfaceMethod, resolveMethod, resolveMethod
-
Methods inherited from interface io.hotmoka.verification.TakamakaClassLoader
getAccount, getAccountED25519, getAccountQTESLA1, getAccountQTESLA3, getAccountSHA256DSA, getContract, getExternallyOwnedAccount, getGamete, getStorage, isa, isConsensusUpdateEvent, isContract, isEagerlyLoaded, isExported, isGasPriceUpdateEvent, isInterface, isLazilyLoaded, isStorage, isValidatorsUpdateEvent
-
-
-
-
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 thestorageReferencefield 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 booleaninStoragefield 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 thebalancefield 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 thebalanceRedfield 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 thebalancefield of the given contract in RAM.- Parameters:
object- the contractvalue- to value to set for the balance of the contract
-
setNonceOf
void setNonceOf(Object object, BigInteger value)
Sets the value of thenoncefield of the given account in RAM.- Parameters:
object- the accountvalue- to value to set for the nonce of the account
-
setRedBalanceOf
void setRedBalanceOf(Object object, BigInteger value)
Sets the val)ue of thebalanceRedfield of the given red/green contract in RAM.- Parameters:
object- the contractvalue- to value to set for the red balance of the contract
-
-