Class ChoiceMetadata<Tpl,​ArgType,​ResType>

  • Type Parameters:
    Tpl - The generated template class or marker interface for a Daml interface
    ArgType - The choice's argument type
    ResType - The result from exercising the choice

    public final class ChoiceMetadata<Tpl,​ArgType,​ResType>
    extends java.lang.Object
    This represents a Daml choice that can be exercised on ContractIds of type ContractId<Tpl>.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String name
      The choice name *
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <Tpl,​ArgType,​ResType>
      ChoiceMetadata<Tpl,​ArgType,​ResType>
      create​(java.lang.String name, java.util.function.Function<ArgType,​Value> encodeArg)
      INTERNAL API: this is meant for use by the Java code generator, and should not be referenced directly.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • name

        public final java.lang.String name
        The choice name *
    • Method Detail

      • create

        public static <Tpl,​ArgType,​ResType> ChoiceMetadata<Tpl,​ArgType,​ResType> create​(java.lang.String name,
                                                                                                               java.util.function.Function<ArgType,​Value> encodeArg)
        INTERNAL API: this is meant for use by the Java code generator, and should not be referenced directly. Applications should refer to the generated CHOICE_* fields on templates or interfaces.