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- The- DamlRecordsubclass 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 generatedtoInterfaceoverloads.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static interfaceInterfaceCompanion.FromJson<T>
 - 
Field SummaryFields Modifier and Type Field Description ValueDecoder<View>valueDecoder- 
Fields inherited from class com.daml.ledger.javaapi.data.codegen.ContractTypeCompanionchoices, TEMPLATE_ID, TEMPLATE_ID_WITH_PACKAGE_ID
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedInterfaceCompanion(java.lang.String templateClassName, Identifier templateId, java.util.function.Function<java.lang.String,Id> newContractId, ValueDecoder<View> valueDecoder, InterfaceCompanion.FromJson<View> fromJson, java.util.List<Choice<I,?,?>> choices)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Contract<Id,View>fromCreatedEvent(CreatedEvent event)Tries to parse a contract from an event expected to create aCtcontract.ViewfromJson(java.lang.String json)- 
Methods inherited from class com.daml.ledger.javaapi.data.codegen.ContractTypeCompaniontoContractId
 
- 
 
- 
- 
- 
Field Detail- 
valueDecoderpublic final ValueDecoder<View> valueDecoder 
 
- 
 - 
Constructor Detail- 
InterfaceCompanionprotected InterfaceCompanion(java.lang.String templateClassName, Identifier templateId, java.util.function.Function<java.lang.String,Id> newContractId, ValueDecoder<View> valueDecoder, InterfaceCompanion.FromJson<View> fromJson, java.util.List<Choice<I,?,?>> choices)
 
- 
 - 
Method Detail- 
fromJsonpublic View fromJson(java.lang.String json) throws JsonLfDecoder.Error - Throws:
- JsonLfDecoder.Error
 
 - 
fromCreatedEventpublic final Contract<Id,View> fromCreatedEvent(CreatedEvent event) throws java.lang.IllegalArgumentException Description copied from class:ContractTypeCompanionTries to parse a contract from an event expected to create aCtcontract. This is either theCreatedEvent.getArguments()forContractCompanion, or one ofCreatedEvent.getInterfaceViews()for anInterfaceCompanion.- Specified by:
- fromCreatedEventin class- ContractTypeCompanion<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:
- java.lang.IllegalArgumentException- when the- CreatedEventpayload cannot be parsed as- Data, or the- CreatedEvent.getContractKey()cannot be parsed as a contract key.
 
 
- 
 
-