core: Remove colons from @param comments

This commit is contained in:
Andras Slemmer 2016-07-11 14:18:33 +01:00
parent 4324e33fea
commit e13a95857a
4 changed files with 40 additions and 40 deletions

View File

@ -11,15 +11,15 @@ import java.io.InputStream
interface OutputStateLookup { interface OutputStateLookup {
/** /**
* Retrieves an output previously defined by [TransactionDSLInterpreter._output] with a label passed in. * Retrieves an output previously defined by [TransactionDSLInterpreter._output] with a label passed in.
* @param clazz: The class object holding the type of the output state expected. * @param clazz The class object holding the type of the output state expected.
* @param label: The label of the to-be-retrieved output state * @param label The label of the to-be-retrieved output state
* @return: The output [StateAndRef] * @return The output [StateAndRef]
*/ */
fun <S : ContractState> retrieveOutputStateAndRef(clazz: Class<S>, label: String): StateAndRef<S> fun <S : ContractState> retrieveOutputStateAndRef(clazz: Class<S>, label: String): StateAndRef<S>
} }
/** /**
* This interface asserts that the DSL at hand is capable of verifying it's underlying construct(ledger/transaction) * This interface asserts that the DSL at hand is capable of verifying its underlying construct(ledger/transaction)
*/ */
interface Verifies { interface Verifies {
/** /**
@ -29,7 +29,7 @@ interface Verifies {
/** /**
* Asserts that verifies() throws * Asserts that verifies() throws
* @param expectedMessage: An optional string to be searched for in the raised exception. * @param expectedMessage An optional string to be searched for in the raised exception.
*/ */
fun failsWith(expectedMessage: String?): EnforceVerifyOrFail { fun failsWith(expectedMessage: String?): EnforceVerifyOrFail {
val exceptionThrown = try { val exceptionThrown = try {
@ -78,34 +78,34 @@ interface Verifies {
interface LedgerDSLInterpreter<out T : TransactionDSLInterpreter> : Verifies, OutputStateLookup { interface LedgerDSLInterpreter<out T : TransactionDSLInterpreter> : Verifies, OutputStateLookup {
/** /**
* Creates and adds a transaction to the ledger. * Creates and adds a transaction to the ledger.
* @param transactionLabel: Optional label of the transaction, to be used in diagnostic messages. * @param transactionLabel Optional label of the transaction, to be used in diagnostic messages.
* @param transactionBuilder: The base transactionBuilder that will be used to build the transaction. * @param transactionBuilder The base transactionBuilder that will be used to build the transaction.
* @param dsl: The dsl that should be interpreted for building the transaction. * @param dsl The dsl that should be interpreted for building the transaction.
* @return: The final [WireTransaction] of the built transaction. * @return The final [WireTransaction] of the built transaction.
*/ */
fun _transaction(transactionLabel: String?, transactionBuilder: TransactionBuilder, fun _transaction(transactionLabel: String?, transactionBuilder: TransactionBuilder,
dsl: TransactionDSL<T>.() -> EnforceVerifyOrFail): WireTransaction dsl: TransactionDSL<T>.() -> EnforceVerifyOrFail): WireTransaction
/** /**
* Creates and adds a transaction to the ledger that will not be verified by [verifies]. * Creates and adds a transaction to the ledger that will not be verified by [verifies].
* @param transactionLabel: Optional label of the transaction, to be used in diagnostic messages. * @param transactionLabel Optional label of the transaction, to be used in diagnostic messages.
* @param transactionBuilder: The base transactionBuilder that will be used to build the transaction. * @param transactionBuilder The base transactionBuilder that will be used to build the transaction.
* @param dsl: The dsl that should be interpreted for building the transaction. * @param dsl The dsl that should be interpreted for building the transaction.
* @return: The final [WireTransaction] of the built transaction. * @return The final [WireTransaction] of the built transaction.
*/ */
fun _unverifiedTransaction(transactionLabel: String?, transactionBuilder: TransactionBuilder, fun _unverifiedTransaction(transactionLabel: String?, transactionBuilder: TransactionBuilder,
dsl: TransactionDSL<T>.() -> Unit): WireTransaction dsl: TransactionDSL<T>.() -> Unit): WireTransaction
/** /**
* Creates a local scoped copy of the ledger. * Creates a local scoped copy of the ledger.
* @param dsl: The ledger DSL to be interpreted using the copy. * @param dsl The ledger DSL to be interpreted using the copy.
*/ */
fun tweak(dsl: LedgerDSL<T, LedgerDSLInterpreter<T>>.() -> Unit) fun tweak(dsl: LedgerDSL<T, LedgerDSLInterpreter<T>>.() -> Unit)
/** /**
* Adds an attachment to the ledger. * Adds an attachment to the ledger.
* @param attachment: The [InputStream] defining the contents of the attachment. * @param attachment The [InputStream] defining the contents of the attachment.
* @return: The [SecureHash] that identifies the attachment, to be used in transactions. * @return The [SecureHash] that identifies the attachment, to be used in transactions.
*/ */
fun attachment(attachment: InputStream): SecureHash fun attachment(attachment: InputStream): SecureHash

View File

@ -345,9 +345,9 @@ data class TestLedgerDSLInterpreter private constructor (
/** /**
* Signs all transactions passed in. * Signs all transactions passed in.
* @param transactionsToSign: Transactions to be signed. * @param transactionsToSign Transactions to be signed.
* @param extraKeys: extra keys to sign transactions with. * @param extraKeys extra keys to sign transactions with.
* @return: List of [SignedTransaction]s. * @return List of [SignedTransaction]s.
*/ */
fun signAll(transactionsToSign: List<WireTransaction>, extraKeys: Array<out KeyPair>) = transactionsToSign.map { wtx -> fun signAll(transactionsToSign: List<WireTransaction>, extraKeys: Array<out KeyPair>) = transactionsToSign.map { wtx ->
val allPubKeys = wtx.signers.toMutableSet() val allPubKeys = wtx.signers.toMutableSet()
@ -365,8 +365,8 @@ fun signAll(transactionsToSign: List<WireTransaction>, extraKeys: Array<out KeyP
/** /**
* Signs all transactions in the ledger. * Signs all transactions in the ledger.
* @param extraKeys: extra keys to sign transactions with. * @param extraKeys extra keys to sign transactions with.
* @return: List of [SignedTransaction]s. * @return List of [SignedTransaction]s.
*/ */
fun LedgerDSL<TestTransactionDSLInterpreter, TestLedgerDSLInterpreter>.signAll( fun LedgerDSL<TestTransactionDSLInterpreter, TestLedgerDSLInterpreter>.signAll(
vararg extraKeys: KeyPair) = signAll(this.interpreter.wireTransactions, extraKeys) vararg extraKeys: KeyPair) = signAll(this.interpreter.wireTransactions, extraKeys)

View File

@ -90,9 +90,9 @@ object JavaTestHelpers {
/** /**
* Creates and tests a ledger built by the passed in dsl. * Creates and tests a ledger built by the passed in dsl.
* @param identityService: The [IdentityService] to be used while building the ledger. * @param identityService The [IdentityService] to be used while building the ledger.
* @param storageService: The [StorageService] to be used for storing e.g. [Attachment]s. * @param storageService The [StorageService] to be used for storing e.g. [Attachment]s.
* @param dsl: The dsl building the ledger. * @param dsl The dsl building the ledger.
*/ */
@JvmStatic @JvmOverloads fun ledger( @JvmStatic @JvmOverloads fun ledger(
identityService: IdentityService = MOCK_IDENTITY_SERVICE, identityService: IdentityService = MOCK_IDENTITY_SERVICE,

View File

@ -10,7 +10,7 @@ import java.time.Instant
/** /**
* This interface defines the bare bone functionality that a Transaction DSL interpreter should implement. * 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 * @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 { interface TransactionDSLInterpreter : Verifies, OutputStateLookup {
@ -21,34 +21,34 @@ interface TransactionDSLInterpreter : Verifies, OutputStateLookup {
/** /**
* Adds an input reference to the transaction. Note that [verifies] will resolve this reference. * Adds an input reference to the transaction. Note that [verifies] will resolve this reference.
* @param stateRef: The input [StateRef]. * @param stateRef The input [StateRef].
*/ */
fun input(stateRef: StateRef) fun input(stateRef: StateRef)
/** /**
* Adds an output to the transaction. * Adds an output to the transaction.
* @param label: An optional label that may be later used to retrieve the output probably in other transactions. * @param label An optional label that may be later used to retrieve the output probably in other transactions.
* @param notary: The associated notary. * @param notary The associated notary.
* @param contractState: The state itself. * @param contractState The state itself.
*/ */
fun _output(label: String?, notary: Party, contractState: ContractState) fun _output(label: String?, notary: Party, contractState: ContractState)
/** /**
* Adds an [Attachment] reference to the transaction. * Adds an [Attachment] reference to the transaction.
* @param attachmentId: The hash of the attachment, possibly returned by [LedgerDSLInterpreter.attachment] * @param attachmentId The hash of the attachment, possibly returned by [LedgerDSLInterpreter.attachment]
*/ */
fun attachment(attachmentId: SecureHash) fun attachment(attachmentId: SecureHash)
/** /**
* Adds a command to the transaction. * Adds a command to the transaction.
* @param signers: The signer public keys. * @param signers The signer public keys.
* @param commandData: The contents of the command. * @param commandData The contents of the command.
*/ */
fun _command(signers: List<PublicKey>, commandData: CommandData) fun _command(signers: List<PublicKey>, commandData: CommandData)
/** /**
* Creates a local scoped copy of the transaction. * Creates a local scoped copy of the transaction.
* @param dsl: The transaction DSL to be interpreted using the copy. * @param dsl The transaction DSL to be interpreted using the copy.
*/ */
fun tweak(dsl: TransactionDSL<TransactionDSLInterpreter>.() -> EnforceVerifyOrFail): EnforceVerifyOrFail fun tweak(dsl: TransactionDSL<TransactionDSLInterpreter>.() -> EnforceVerifyOrFail): EnforceVerifyOrFail
} }
@ -58,14 +58,14 @@ class TransactionDSL<out T : TransactionDSLInterpreter> (val interpreter: T) :
/** /**
* Looks up the output label and adds the found state as an input. * Looks up the output label and adds the found state as an input.
* @param stateLabel: The label of the output state specified when calling [TransactionDSLInterpreter._output] and friends. * @param stateLabel The label of the output state specified when calling [TransactionDSLInterpreter._output] and friends.
*/ */
fun input(stateLabel: String) = input(retrieveOutputStateAndRef(ContractState::class.java, stateLabel).ref) fun input(stateLabel: String) = input(retrieveOutputStateAndRef(ContractState::class.java, stateLabel).ref)
/** /**
* Creates an [LedgerDSLInterpreter._unverifiedTransaction] with a single output state and adds it's reference as an * Creates an [LedgerDSLInterpreter._unverifiedTransaction] with a single output state and adds it's reference as an
* input to the current transaction. * input to the current transaction.
* @param state: The state to be added. * @param state The state to be added.
*/ */
fun input(state: ContractState) { fun input(state: ContractState) {
val transaction = ledgerInterpreter._unverifiedTransaction(null, TransactionBuilder()) { val transaction = ledgerInterpreter._unverifiedTransaction(null, TransactionBuilder()) {
@ -102,17 +102,17 @@ class TransactionDSL<out T : TransactionDSLInterpreter> (val interpreter: T) :
/** /**
* Adds a timestamp command to the transaction. * Adds a timestamp command to the transaction.
* @param time: The [Instant] of the [TimestampCommand]. * @param time The [Instant] of the [TimestampCommand].
* @param tolerance: The tolerance of the [TimestampCommand]. * @param tolerance The tolerance of the [TimestampCommand].
* @param notary: The notary to sign the command. * @param notary The notary to sign the command.
*/ */
@JvmOverloads @JvmOverloads
fun timestamp(time: Instant, tolerance: Duration = 30.seconds, notary: PublicKey = DUMMY_NOTARY.owningKey) = fun timestamp(time: Instant, tolerance: Duration = 30.seconds, notary: PublicKey = DUMMY_NOTARY.owningKey) =
timestamp(TimestampCommand(time, tolerance), notary) timestamp(TimestampCommand(time, tolerance), notary)
/** /**
* Adds a timestamp command to the transaction. * Adds a timestamp command to the transaction.
* @param data: The [TimestampCommand]. * @param data The [TimestampCommand].
* @param notary: The notary to sign the command. * @param notary The notary to sign the command.
*/ */
@JvmOverloads @JvmOverloads
fun timestamp(data: TimestampCommand, notary: PublicKey = DUMMY_NOTARY.owningKey) = command(notary, data) fun timestamp(data: TimestampCommand, notary: PublicKey = DUMMY_NOTARY.owningKey) = command(notary, data)