com.r3corda.core.contracts.clauses / InterceptorClause

# InterceptorClause

`class InterceptorClause : SingleClause`

A clause which intercepts calls to a wrapped clause, and passes them through verification only from a pre-clause. This is similar to an inceptor in aspect orientated programming.

### Constructors

<init> | `InterceptorClause(preclause: SingleVerify, clause: SingleClause)` A clause which intercepts calls to a wrapped clause, and passes them through verification only from a pre-clause. This is similar to an inceptor in aspect orientated programming.

### Properties

clause | `val clause: SingleClause`
ifMatched | `val ifMatched: MatchBehaviour` Behaviour if this clause is not matches
ifNotMatched | `val ifNotMatched: MatchBehaviour` Behaviour if this clause is matched
preclause | `val preclause: SingleVerify`
requiredCommands | `val requiredCommands: Set<Class<out CommandData>>` Classes for commands which must ALL be present in transaction for this clause to be triggered

### Functions

toString | `fun toString(): String`
verify | `fun verify(tx: TransactionForContract, commands: Collection<AuthenticatedObject<CommandData>>): Set<CommandData>` Verify the transaction matches the conditions from this clause. For example, a "no zero amount output" clause would check each of the output states that it applies to, looking for a zero amount, and throw IllegalStateException if any matched.