CordappContext - corda

corda / net.corda.core.cordapp / CordappContext

# CordappContext

`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.

### Constructors

#### <init> | `CordappContext(cordapp: Cordapp, attachmentId: SecureHash?, classLoader: ClassLoader)`

### Properties

#### attachmentId | For CorDapps containing Contract or UpgradedContract implementations this will be populated with the attachment containing those class files `val attachmentId: SecureHash?`
#### classLoader | the classloader used to load this cordapp's classes `val classLoader: ClassLoader`
#### config | Configuration for this CorDapp `val config: CordappConfig`
#### cordapp | The cordapp this context is about `val cordapp: Cordapp`

### Companion Object Functions

#### create | `fun create(cordapp: Cordapp, attachmentId: SecureHash?, classLoader: ClassLoader, config: CordappConfig): CordappContext`