Class InterfaceCompanion<I,Id,View>
java.lang.Object
com.daml.ledger.javaapi.data.codegen.ContractTypeCompanion<Contract<Id,View>,Id,I,View>
com.daml.ledger.javaapi.data.codegen.InterfaceCompanion<I,Id,View>
- Type Parameters:
I
- The generated interface marker class.View
- TheDamlRecord
subclass representing the interface view, as may be retrieved from the ACS or transaction stream.
public abstract class InterfaceCompanion<I,Id,View>
extends ContractTypeCompanion<Contract<Id,View>,Id,I,View>
Metadata and utilities associated with an interface as a whole. Its subclasses serve to
disambiguate various generated
toInterface
overloads.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.daml.ledger.javaapi.data.codegen.ContractTypeCompanion
ContractTypeCompanion.Package
-
Field Summary
FieldsFields inherited from class com.daml.ledger.javaapi.data.codegen.ContractTypeCompanion
choices, PACKAGE, PACKAGE_ID, PACKAGE_NAME, PACKAGE_VERSION, TEMPLATE_ID, TEMPLATE_ID_WITH_PACKAGE_ID
-
Method Summary
Modifier and TypeMethodDescriptionfromCreatedEvent
(CreatedEvent event) Tries to parse a contract from an event expected to create aCt
contract.Methods inherited from class com.daml.ledger.javaapi.data.codegen.ContractTypeCompanion
getTemplateIdWithPackageId, toContractId
-
Field Details
-
valueDecoder
-
-
Method Details
-
fromJson
- Throws:
JsonLfDecoder.Error
-
fromCreatedEvent
Description copied from class:ContractTypeCompanion
Tries to parse a contract from an event expected to create aCt
contract. This is either theCreatedEvent.getArguments()
forContractCompanion
, or one ofCreatedEvent.getInterfaceViews()
for anInterfaceCompanion
.- Specified by:
fromCreatedEvent
in classContractTypeCompanion<Contract<Id,
View>, Id, I, View> - Parameters:
event
- the event to try to parse a contract from- Returns:
- The parsed contract, with payload and metadata, if present.
- Throws:
IllegalArgumentException
- when theCreatedEvent
payload cannot be parsed asData
, or theCreatedEvent.getContractKey()
cannot be parsed as a contract key.
-