public class AutomaticHashConstraint implements AttachmentConstraint
This interface AttachmentConstraint
is a convenience class that will be automatically resolved to a class HashAttachmentConstraint
.
The resolution occurs in TransactionBuilder.toWireTransaction and uses the TransactionState.contract value
to find a corresponding loaded Cordapp that contains such a contract, and then uses that Cordapp as the
interface Attachment
.
If, for any reason, this class is not automatically resolved the default implementation is to fail, because the
intent of this class is that it should be replaced by a correct class HashAttachmentConstraint
and verify against an
actual interface Attachment
.
Modifier and Type | Field and Description |
---|---|
static AutomaticHashConstraint |
INSTANCE
This
interface AttachmentConstraint is a convenience class that will be automatically resolved to a class HashAttachmentConstraint .
The resolution occurs in TransactionBuilder.toWireTransaction and uses the TransactionState.contract value
to find a corresponding loaded Cordapp that contains such a contract, and then uses that Cordapp as the
interface Attachment . |
Modifier and Type | Method and Description |
---|---|
boolean |
isSatisfiedBy(Attachment attachment)
Returns whether the given contract attachment can be used with the
interface ContractState associated with this constraint object. |
isSatisfiedBy
public static AutomaticHashConstraint INSTANCE
This interface AttachmentConstraint
is a convenience class that will be automatically resolved to a class HashAttachmentConstraint
.
The resolution occurs in TransactionBuilder.toWireTransaction and uses the TransactionState.contract value
to find a corresponding loaded Cordapp that contains such a contract, and then uses that Cordapp as the
interface Attachment
.
If, for any reason, this class is not automatically resolved the default implementation is to fail, because the
intent of this class is that it should be replaced by a correct class HashAttachmentConstraint
and verify against an
actual interface Attachment
.
public boolean isSatisfiedBy(Attachment attachment)
Returns whether the given contract attachment can be used with the interface ContractState
associated with this constraint object.
interface ContractState