-
- All Superinterfaces:
ResolvingClassLoader
public interface TakamakaClassLoader extends ResolvingClassLoader
A class loader used to access the definition of the classes of a Takamaka program.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Class<?>getAccount()Yields the class token of the account interface.Class<?>getAccountED25519()Yields the class token of the interface for accounts that use the ed25519 algorithm for signing transactions.Class<?>getAccountQTESLA1()Yields the class token of the interface for accounts that use the qtesla-p-I algorithm for signing transactions.Class<?>getAccountQTESLA3()Yields the class token of the interface for accounts that use the qtesla-p-III algorithm for signing transactions.Class<?>getAccountSHA256DSA()Yields the class token of the interface for accounts that use the sha256dsa algorithm for signing transactions.Class<?>getContract()Yields the class token of the contract class.Class<?>getExternallyOwnedAccount()Yields the class token of the externally owned account class.Class<?>getGamete()Yields the class token of gamete class.Class<?>getStorage()Yields the class token of the storage class.booleanisa(String className, String superclassName)Checks if a class is an instance of another class.booleanisConsensusUpdateEvent(String className)Checks if a class is an instance of the consensus update event class.booleanisContract(String className)Checks if a class is an instance of the contract class.booleanisEagerlyLoaded(Class<?> type)Determines if a field of a storage class, having the given field, is eagerly loaded.booleanisExported(String className)Checks if a class is annotated as@@Exported.booleanisGasPriceUpdateEvent(String className)Checks if a class is an instance of the gas price update event class.booleanisInterface(String className)Checks if a class is actually an interface.booleanisLazilyLoaded(Class<?> type)Determines if a field of a storage class, having the given field, is lazily loaded.booleanisStorage(String className)Determines if a class is an instance of the storage class.booleanisValidatorsUpdateEvent(String className)Checks if a class is an instance of the validators update event class.static TakamakaClassLoaderof(Stream<byte[]> jars, int verificationVersion)Builds a class loader with the given jars, given as byte arrays.-
Methods inherited from interface io.hotmoka.whitelisting.ResolvingClassLoader
getJavaClassLoader, getVerificationVersion, getWhiteListingWizard, loadClass, resolveConstructor, resolveConstructor, resolveField, resolveField, resolveInterfaceMethod, resolveInterfaceMethod, resolveMethod, resolveMethod
-
-
-
-
Method Detail
-
of
static TakamakaClassLoader of(Stream<byte[]> jars, int verificationVersion)
Builds a class loader with the given jars, given as byte arrays.- Parameters:
jars- the jarsverificationVersion- the version of the verification module that must b e used; this affects the set of white-listing annotations used by the class loader
-
isStorage
boolean isStorage(String className)
Determines if a class is an instance of the storage class.- Parameters:
className- the name of the class- Returns:
- true if and only if that class extends
io.takamaka.code.lang.Storage
-
isContract
boolean isContract(String className)
Checks if a class is an instance of the contract class.- Parameters:
className- the name of the class- Returns:
- true if and only if that condition holds
-
isConsensusUpdateEvent
boolean isConsensusUpdateEvent(String className)
Checks if a class is an instance of the consensus update event class.- Parameters:
className- the name of the class- Returns:
- true if and only if that condition holds
-
isGasPriceUpdateEvent
boolean isGasPriceUpdateEvent(String className)
Checks if a class is an instance of the gas price update event class.- Parameters:
className- the name of the class- Returns:
- true if and only if that condition holds
-
isValidatorsUpdateEvent
boolean isValidatorsUpdateEvent(String className)
Checks if a class is an instance of the validators update event class.- Parameters:
className- the name of the class- Returns:
- true if and only if that condition holds
-
isa
boolean isa(String className, String superclassName)
Checks if a class is an instance of another class.- Parameters:
className- the classsuperclassName- the potential superclass ofclassName- Returns:
- true if and only if
classNameis a subclass ofsuperclassName
-
isExported
boolean isExported(String className)
Checks if a class is annotated as@@Exported.- Parameters:
className- the name of the class- Returns:
- true if and only if that condition holds
-
isInterface
boolean isInterface(String className)
Checks if a class is actually an interface.- Parameters:
className- the name of the class- Returns:
- true if and only if that condition holds
-
isLazilyLoaded
boolean isLazilyLoaded(Class<?> type)
Determines if a field of a storage class, having the given field, is lazily loaded.- Parameters:
type- the type- Returns:
- true if and only if that condition holds
-
isEagerlyLoaded
boolean isEagerlyLoaded(Class<?> type)
Determines if a field of a storage class, having the given field, is eagerly loaded.- Parameters:
type- the type- Returns:
- true if and only if that condition holds
-
getContract
Class<?> getContract()
Yields the class token of the contract class.- Returns:
- the class token
-
getStorage
Class<?> getStorage()
Yields the class token of the storage class.- Returns:
- the class token
-
getAccount
Class<?> getAccount()
Yields the class token of the account interface.- Returns:
- the class token
-
getAccountED25519
Class<?> getAccountED25519()
Yields the class token of the interface for accounts that use the ed25519 algorithm for signing transactions.- Returns:
- the class token
-
getAccountQTESLA1
Class<?> getAccountQTESLA1()
Yields the class token of the interface for accounts that use the qtesla-p-I algorithm for signing transactions.- Returns:
- the class token
-
getAccountQTESLA3
Class<?> getAccountQTESLA3()
Yields the class token of the interface for accounts that use the qtesla-p-III algorithm for signing transactions.- Returns:
- the class token
-
getAccountSHA256DSA
Class<?> getAccountSHA256DSA()
Yields the class token of the interface for accounts that use the sha256dsa algorithm for signing transactions.- Returns:
- the class token
-
getExternallyOwnedAccount
Class<?> getExternallyOwnedAccount()
Yields the class token of the externally owned account class.- Returns:
- the class token
-
getGamete
Class<?> getGamete()
Yields the class token of gamete class.- Returns:
- the class token
-
-