AutomaticPlaceholderConstraint
Keywords: net.corda.core.contracts.AutomaticPlaceholderConstraint class
Date: 2023-09-18

net.corda.core.contracts

## Class AutomaticPlaceholderConstraint

- net.corda.core.contracts.AutomaticPlaceholderConstraint

- All Implemented Interfaces:
    AttachmentConstraint

      public class AutomaticPlaceholderConstraint
      implements AttachmentConstraint

  This `interface AttachmentConstraint` is a convenience class that acts as a placeholder and will be automatically resolved by the platform when set on an output state. It is the default constraint of all output states.

  The resolution occurs in `TransactionBuilder.toWireTransaction` and is based on the input states and the attachments. If the `interface Contract` was not annotated with `annotationclass NoConstraintPropagation`, then the platform will ensure the correct constraint propagation.

  See Also:
    `interface AttachmentConstraint`, `TransactionBuilder.toWireTransaction`, `interface Contract`, `annotationclass NoConstraintPropagation`

- - ### Field Detail

    - #### INSTANCE

          public static AutomaticPlaceholderConstraint INSTANCE

      This `interface AttachmentConstraint` is a convenience class that acts as a placeholder and will be automatically resolved by the platform when set on an output state. It is the default constraint of all output states.

      The resolution occurs in `TransactionBuilder.toWireTransaction` and is based on the input states and the attachments. If the `interface Contract` was not annotated with `annotationclass NoConstraintPropagation`, then the platform will ensure the correct constraint propagation.

      See Also:
        `interface AttachmentConstraint`, `TransactionBuilder.toWireTransaction`, `interface Contract`, `annotationclass NoConstraintPropagation`

  - ### Method Detail

    - #### isSatisfiedBy

          public boolean isSatisfiedBy(@NotNull
                                       Attachment attachment)

      Returns whether the given contract attachment can be used with the `interface ContractState` associated with this constraint object.

      See Also:
        `interface ContractState`