class CordappContext
An app context provides information about where an app was loaded from, access to its classloader, and (in the included Cordapp object) lists of annotated classes discovered via scanning the JAR.
A CordappContext is obtained from CordappProvider.getAppContext which resides on a ServiceHub. This will be used primarily from within flows.
CordappContext(cordapp: Cordapp, attachmentId: SecureHash?, classLoader: ClassLoader) |
val attachmentId: SecureHash?
For CorDapps containing Contract or UpgradedContract implementations this will be populated with the attachment containing those class files |
|
val classLoader: ClassLoader
the classloader used to load this cordapp's classes |
|
val config: CordappConfig
Configuration for this CorDapp |
|
val cordapp: Cordapp
The cordapp this context is about |
fun create(cordapp: Cordapp, attachmentId: SecureHash?, classLoader: ClassLoader, config: CordappConfig): CordappContext |
fun Any.contextLogger(): <ERROR CLASS>
When called from a companion object, returns the logger for the enclosing class. |