Cordapp
Keywords: net.corda.core.cordapp.Cordapp interface
Date: 2023-09-18

net.corda.core.cordapp

## Interface Cordapp

-     @DoNotImplement
      public Cordapp

  Represents a cordapp by registering the JAR that contains it and all important classes for Corda. Instances of this class are generated automatically at startup of a node and can get retrieved from `CordappProvider.getAppContext` from the `class CordappContext` it returns.

  This will only need to be constructed manually for certain kinds of tests.

  See Also:
    `CordappProvider.getAppContext`, `class CordappContext`

- - ### Constructor Detail

    - #### Cordapp

          public Cordapp()

  - ### Method Detail

    - #### getName

          @NotNull
          java.lang.String getName()

      Cordapp name - derived from the base name of the Cordapp JAR (therefore may not be unique). This is different to `Cordapp.Info.shortName` which should be used instead.

      See Also:
        `Cordapp.Info.shortName`

    - #### getContractClassNames

          @NotNull
          java.util.List<java.lang.String> getContractClassNames()

      List of contracts

    - #### getInitiatedFlows

          @NotNull
          java.util.List<java.lang.Class> getInitiatedFlows()

      List of initiatable flow classes

    - #### getRpcFlows

          @NotNull
          java.util.List<java.lang.Class> getRpcFlows()

      List of RPC initiable flows classes

    - #### getServiceFlows

          @NotNull
          java.util.List<java.lang.Class> getServiceFlows()

      List of `annotationclass CordaService` initiable flows classes

      See Also:
        `annotationclass CordaService`

    - #### getSchedulableFlows

          @NotNull
          java.util.List<java.lang.Class> getSchedulableFlows()

      List of flows startable by the scheduler

    - #### getServices

          @NotNull
          java.util.List<java.lang.Class> getServices()

      List of RPC services

    - #### getTelemetryComponents

          @NotNull
          java.util.List<java.lang.Class> getTelemetryComponents()

    - #### getSerializationWhitelists

          @NotNull
          java.util.List<net.corda.core.serialization.SerializationWhitelist> getSerializationWhitelists()

      List of Corda plugin registries

    - #### getSerializationCustomSerializers

          @NotNull
          java.util.List<net.corda.core.serialization.SerializationCustomSerializer> getSerializationCustomSerializers()

      List of serializers

    - #### getCheckpointCustomSerializers

          @NotNull
          java.util.List<net.corda.core.serialization.CheckpointCustomSerializer> getCheckpointCustomSerializers()

      List of serializers for checkpoints

    - #### getCustomSchemas

          @NotNull
          java.util.Set<net.corda.core.schemas.MappedSchema> getCustomSchemas()

      List of custom schemas

    - #### getAllFlows

          @NotNull
          java.util.List<java.lang.Class> getAllFlows()

      List of all flow classes

    - #### getJarPath

          @NotNull
          java.net.URL getJarPath()

      The path to the JAR for this CorDapp

    - #### getCordappClasses

          @NotNull
          java.util.List<java.lang.String> getCordappClasses()

      An exhaustive list of all classes relevant to the node within this CorDapp

    - #### getInfo

          @NotNull
          net.corda.core.cordapp.Cordapp.Info getInfo()

    - #### getJarHash

          @NotNull
          net.corda.core.crypto.SecureHash.SHA256 getJarHash()

      Hash of the jar

    - #### getMinimumPlatformVersion

          int getMinimumPlatformVersion()

      The minimum platform version this CorDapp will run on.

    - #### getTargetPlatformVersion

          int getTargetPlatformVersion()

      The target platform version this CorDapp was designed and tested on.