OutputStateLookup
Keywords: net.corda.testing.dsl.OutputStateLookup interface
Date: 2023-09-18

net.corda.testing.dsl

## Interface OutputStateLookup

- All Known Subinterfaces:
    LedgerDSLInterpreter<T>, TransactionDSLInterpreter
  All Known Implementing Classes:
    LedgerDSL, TestLedgerDSLInterpreter, TestTransactionDSLInterpreter, TransactionDSL

      @DoNotImplement
      public OutputStateLookup

  This interface defines output state lookup by label. It is split from the interpreter interfaces so that outputs may be looked up both in ledger{..} and transaction{..} blocks.

- - ### Constructor Detail

    - #### OutputStateLookup

          public OutputStateLookup()

  - ### Method Detail

    - #### retrieveOutputStateAndRef

          @NotNull
          <S extends ContractState> StateAndRef<S> retrieveOutputStateAndRef(@NotNull
                                                                                      java.lang.Class<S> clazz,
                                                                                      @NotNull
                                                                                      java.lang.String label)

      Retrieves an output previously defined by `TransactionDSLInterpreter.output` with a label passed in.

      Parameters:
        `clazz` - The class object holding the type of the output state expected.
        `label` - The label of the to-be-retrieved output state.
      Returns:
        The output `class StateAndRef`.
      See Also:
        `TransactionDSLInterpreter.output`