Class InterfaceCompanion<I,​Id,​View>

  • Type Parameters:
    I - The generated interface marker class.
    View - The DamlRecord subclass representing the interface view, as may be retrieved from the ACS or transaction stream.

    public abstract class InterfaceCompanion<I,​Id,​View>
    extends ContractTypeCompanion<I,​View>
    Metadata and utilities associated with an interface as a whole. Its subclasses serve to disambiguate various generated toInterface overloads.
    • Constructor Detail

      • InterfaceCompanion

        protected InterfaceCompanion​(java.lang.String templateClassName,
                                     Identifier templateId,
                                     java.util.function.Function<java.lang.String,​Id> newContractId,
                                     ValueDecoder<View> valueDecoder,
                                     java.util.List<ChoiceMetadata<I,​?,​?>> choices)
        INTERNAL API: this is meant for use by the Java code generator, and should not be referenced directly. Applications should refer to the INTERFACE field on generated code for Daml interfaces instead.
    • Method Detail

      • fromCreatedEvent

        public final Contract<Id,​View> fromCreatedEvent​(CreatedEvent event)
                                                       throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException