Class TemplateUtils


  • public class TemplateUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      TemplateUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.function.Function<CreatedContract,​com.daml.ledger.javaapi.data.Template> contractTransformer​(java.lang.Class<? extends com.daml.ledger.javaapi.data.Template>... allowedTemplates)
      Creates a transform function which is aware of the template types.
      • Methods inherited from class java.lang.Object

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

      • TemplateUtils

        public TemplateUtils()
    • Method Detail

      • contractTransformer

        public static java.util.function.Function<CreatedContract,​com.daml.ledger.javaapi.data.Template> contractTransformer​(java.lang.Class<? extends com.daml.ledger.javaapi.data.Template>... allowedTemplates)
        Creates a transform function which is aware of the template types. Useful to be passed to Bot.wire.
        Parameters:
        allowedTemplates - the list of allowed template types
        Returns:
        a transformation function returning a new contract typed as one of the allowed templates