mirror of
https://github.com/corda/corda.git
synced 2025-06-19 23:53:52 +00:00
Clean up of Dokka comments (#1632)
* Remove use of @see as a cross-reference to actual docs; this is inappropriate (it reflects "See Also", not "See Other"), and often longer than having the actual documentation in place. * Correct syntactical errors in docs * Correct "@returns" to "@return" * Add note about currencies with 3 decimal places
This commit is contained in:
@ -127,7 +127,7 @@ class LedgerDSL<out T : TransactionDSLInterpreter, out L : LedgerDSLInterpreter<
|
||||
LedgerDSLInterpreter<TransactionDSLInterpreter> by interpreter {
|
||||
|
||||
/**
|
||||
* @see LedgerDSLInterpreter._transaction
|
||||
* Creates and adds a transaction to the ledger.
|
||||
*/
|
||||
@JvmOverloads
|
||||
fun transaction(label: String? = null, transactionBuilder: TransactionBuilder = TransactionBuilder(notary = DUMMY_NOTARY),
|
||||
@ -135,7 +135,7 @@ class LedgerDSL<out T : TransactionDSLInterpreter, out L : LedgerDSLInterpreter<
|
||||
_transaction(label, transactionBuilder, dsl)
|
||||
|
||||
/**
|
||||
* @see LedgerDSLInterpreter._unverifiedTransaction
|
||||
* Creates and adds a transaction to the ledger that will not be verified by [verifies].
|
||||
*/
|
||||
@JvmOverloads
|
||||
fun unverifiedTransaction(label: String? = null, transactionBuilder: TransactionBuilder = TransactionBuilder(notary = DUMMY_NOTARY),
|
||||
@ -143,7 +143,7 @@ class LedgerDSL<out T : TransactionDSLInterpreter, out L : LedgerDSLInterpreter<
|
||||
_unverifiedTransaction(label, transactionBuilder, dsl)
|
||||
|
||||
/**
|
||||
* @see OutputStateLookup.retrieveOutputStateAndRef
|
||||
* Retrieves an output previously defined by [TransactionDSLInterpreter._output] with a label passed in.
|
||||
*/
|
||||
inline fun <reified S : ContractState> String.outputStateAndRef(): StateAndRef<S> =
|
||||
retrieveOutputStateAndRef(S::class.java, this)
|
||||
@ -156,7 +156,7 @@ class LedgerDSL<out T : TransactionDSLInterpreter, out L : LedgerDSLInterpreter<
|
||||
outputStateAndRef<S>().state.data
|
||||
|
||||
/**
|
||||
* @see OutputStateLookup.retrieveOutputStateAndRef
|
||||
* Retrieves an output previously defined by [TransactionDSLInterpreter._output] with a label passed in.
|
||||
*/
|
||||
fun <S : ContractState> retrieveOutput(clazz: Class<S>, label: String) =
|
||||
retrieveOutputStateAndRef(clazz, label).state.data
|
||||
|
@ -12,7 +12,7 @@ import java.time.Instant
|
||||
/**
|
||||
* This interface defines the bare bone functionality that a Transaction DSL interpreter should implement.
|
||||
* @param <R> The return type of [verifies]/[failsWith] and the like. It is generic so that we have control over whether
|
||||
* we want to enforce users to call these methods (@see [EnforceVerifyOrFail]) or not.
|
||||
* we want to enforce users to call these methods (see [EnforceVerifyOrFail]) or not.
|
||||
*/
|
||||
interface TransactionDSLInterpreter : Verifies, OutputStateLookup {
|
||||
/**
|
||||
@ -33,7 +33,7 @@ interface TransactionDSLInterpreter : Verifies, OutputStateLookup {
|
||||
* @param encumbrance The position of the encumbrance state.
|
||||
* @param attachmentConstraint The attachment constraint
|
||||
* @param contractState The state itself.
|
||||
* @params contractClassName The class name of the contract that verifies this state.
|
||||
* @param contractClassName The class name of the contract that verifies this state.
|
||||
*/
|
||||
fun _output(contractClassName: ContractClassName,
|
||||
label: String?,
|
||||
@ -96,7 +96,7 @@ class TransactionDSL<out T : TransactionDSLInterpreter>(val interpreter: T) : Tr
|
||||
fun input(contractClassName: ContractClassName, stateClosure: () -> ContractState) = input(contractClassName, stateClosure())
|
||||
|
||||
/**
|
||||
* @see TransactionDSLInterpreter._output
|
||||
* Adds an output to the transaction.
|
||||
*/
|
||||
@JvmOverloads
|
||||
fun output(contractClassName: ContractClassName,
|
||||
@ -108,24 +108,27 @@ class TransactionDSL<out T : TransactionDSLInterpreter>(val interpreter: T) : Tr
|
||||
_output(contractClassName, label, notary, encumbrance, attachmentConstraint, contractStateClosure())
|
||||
|
||||
/**
|
||||
* @see TransactionDSLInterpreter._output
|
||||
* Adds a labelled output to the transaction.
|
||||
*/
|
||||
@JvmOverloads
|
||||
fun output(contractClassName: ContractClassName, label: String, contractState: ContractState, attachmentConstraint: AttachmentConstraint = AutomaticHashConstraint) =
|
||||
_output(contractClassName, label, DUMMY_NOTARY, null, attachmentConstraint, contractState)
|
||||
|
||||
/**
|
||||
* Adds an output to the transaction.
|
||||
*/
|
||||
@JvmOverloads
|
||||
fun output(contractClassName: ContractClassName, contractState: ContractState, attachmentConstraint: AttachmentConstraint = AutomaticHashConstraint) =
|
||||
_output(contractClassName,null, DUMMY_NOTARY, null, attachmentConstraint, contractState)
|
||||
|
||||
/**
|
||||
* @see TransactionDSLInterpreter._command
|
||||
* Adds a command to the transaction.
|
||||
*/
|
||||
fun command(vararg signers: PublicKey, commandDataClosure: () -> CommandData) =
|
||||
_command(listOf(*signers), commandDataClosure())
|
||||
|
||||
/**
|
||||
* @see TransactionDSLInterpreter._command
|
||||
* Adds a command to the transaction.
|
||||
*/
|
||||
fun command(signer: PublicKey, commandData: CommandData) = _command(listOf(signer), commandData)
|
||||
|
||||
|
Reference in New Issue
Block a user