- 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 TypeMethodDescriptiongetBalanceOf(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.Yields the lengths (in bytes) of the instrumented jars of the classpath and its dependencies used to create this class loader.getRedBalanceOf(Object object) Yields the value of thebalanceRedfield of the given red/green contract in RAM.getStorageReferenceOf(Object object) Yields the value of thestorageReferencefield 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.voidincreaseCurrentSupply(Object validators, BigInteger amount) Adds the given amount of coins to the current amount of the validators set of the node.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 value of thebalanceRedfield of the given red/green contract in RAM.transactionThatInstalledJarFor(Class<?> clazz) 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, resolveMethodMethods 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
Yields the transaction reference that installed the jar where the given class is defined.- Parameters:
clazz- the class- Returns:
- the transaction reference
-
getStorageReferenceOf
Yields the value of thestorageReferencefield of the given storage object in RAM.- Parameters:
object- the object- Returns:
- the value of the field
-
getInStorageOf
Yields the value of the booleaninStoragefield of the given storage object in RAM.- Parameters:
object- the object- Returns:
- the value of the field
-
getBalanceOf
Yields the value of thebalancefield of the given contract in RAM.- Parameters:
object- the contract- Returns:
- the value of the field
-
getRedBalanceOf
Yields the value of thebalanceRedfield of the given red/green contract in RAM.- Parameters:
object- the contract- Returns:
- the value of the field
-
setBalanceOf
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
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
Sets the value 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
-
increaseCurrentSupply
Adds the given amount of coins to the current amount of the validators set of the node.- Parameters:
validators- the object containing the validators setamount- the amount to add (if positive) or remove (if negative)
-