public class CordappContext
An app context provides information about where an app was loaded from, access to its classloader,
and (in the included interface 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.
interface Cordapp
,
CordappProvider.getAppContext
,
ServiceHub@Deprecated public CordappContext(@NotNull Cordapp cordapp, @Nullable SecureHash attachmentId, @NotNull java.lang.ClassLoader classLoader)
@NotNull public Cordapp getCordapp()
The cordapp this context is about
@Nullable public SecureHash getAttachmentId()
For CorDapps containing
Contract or UpgradedContract implementations this will be populatedwith the attachment containing those class files
@NotNull public java.lang.ClassLoader getClassLoader()
the classloader used to load this cordapp
's classes
@NotNull public CordappConfig getConfig()
Configuration for this CorDapp