diff --git a/core/src/main/kotlin/net/corda/core/contracts/ContractState.kt b/core/src/main/kotlin/net/corda/core/contracts/ContractState.kt index ab4bb2acb4..f797254f21 100644 --- a/core/src/main/kotlin/net/corda/core/contracts/ContractState.kt +++ b/core/src/main/kotlin/net/corda/core/contracts/ContractState.kt @@ -4,6 +4,7 @@ import net.corda.core.identity.AbstractParty import net.corda.core.identity.Party import net.corda.core.serialization.CordaSerializable +// DOCSTART 1 /** * A contract state (or just "state") contains opaque data used by a contract program. It can be thought of as a disk * file that the program can use to persist data across transactions. States are immutable: once created they are never @@ -24,4 +25,5 @@ interface ContractState { * The participants list should normally be derived from the contents of the state. */ val participants: List -} \ No newline at end of file +} +// DOCEND 1 diff --git a/core/src/main/kotlin/net/corda/core/contracts/TransactionState.kt b/core/src/main/kotlin/net/corda/core/contracts/TransactionState.kt index eab1320231..310e1030b2 100644 --- a/core/src/main/kotlin/net/corda/core/contracts/TransactionState.kt +++ b/core/src/main/kotlin/net/corda/core/contracts/TransactionState.kt @@ -3,6 +3,7 @@ package net.corda.core.contracts import net.corda.core.identity.Party import net.corda.core.serialization.CordaSerializable +// DOCSTART 1 typealias ContractClassName = String /** @@ -75,4 +76,5 @@ data class TransactionState @JvmOverloads constructor( /** * A validator for the contract attachments on the transaction. */ - val constraint: AttachmentConstraint = AlwaysAcceptAttachmentConstraint) \ No newline at end of file + val constraint: AttachmentConstraint = AlwaysAcceptAttachmentConstraint) +// DOCEND 1 diff --git a/docs/source/api-states.rst b/docs/source/api-states.rst index 6c8f7a0810..30b4b3686e 100644 --- a/docs/source/api-states.rst +++ b/docs/source/api-states.rst @@ -9,7 +9,7 @@ In Corda, states are classes that implement ``ContractState``. The ``ContractSta .. container:: codeset - .. literalinclude:: ../../core/src/main/kotlin/net/corda/core/contracts/Structures.kt + .. literalinclude:: ../../core/src/main/kotlin/net/corda/core/contracts/ContractState.kt :language: kotlin :start-after: DOCSTART 1 :end-before: DOCEND 1 @@ -140,10 +140,10 @@ When a ``ContractState`` is added to a ``TransactionBuilder``, it is wrapped in .. container:: codeset - .. literalinclude:: ../../core/src/main/kotlin/net/corda/core/contracts/Structures.kt + .. literalinclude:: ../../core/src/main/kotlin/net/corda/core/contracts/TransactionState.kt :language: kotlin - :start-after: DOCSTART 4 - :end-before: DOCEND 4 + :start-after: DOCSTART 1 + :end-before: DOCEND 1 Where: