Packages

final case class LFUtil(packageName: String, iface: EnvironmentInterface, outputDir: File) extends Util with Product with Serializable

In order to avoid endlessly passing around "packageName" and "iface" to utility functions we initialise a class with these values and allow all the methods to have access to them.

Linear Supertypes
Serializable, Product, Equals, Util, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LFUtil
  2. Serializable
  3. Product
  4. Equals
  5. Util
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new LFUtil(packageName: String, iface: EnvironmentInterface, outputDir: File)

Type Members

  1. case class DamlScalaName(packageSuffixParts: Array[String], name: String) extends Product with Serializable

    A Scala class/object package suffix and name.

    A Scala class/object package suffix and name.

    packageSuffixParts

    the package suffix of the class. This will be appended to the packageNameElems to create the package for this Scala class/object

    name

    the name of the class/object

    Definition Classes
    Util
  2. type Interface = EnvironmentInterface
    Definition Classes
    LFUtilUtil
  3. type RefType = TypeConNameOrPrimType
    Definition Classes
    Util
  4. type TemplateInterface = DefTemplateWithRecord[Type]
    Definition Classes
    LFUtilUtil

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  8. def genArgsWithTypes(fields: Seq[FieldWithType]): Seq[scala.reflect.api.JavaUniverse.Typed]
  9. def genArgumentValueToGenType(genType: Type): scala.reflect.api.JavaUniverse.Tree

    Generate the function that converts an ArgumentValue into the given Type

    Generate the function that converts an ArgumentValue into the given Type

    genType

    the output type of the generated function

    returns

    the function that converts an ArgumentValue into the given Type

    Definition Classes
    LFUtilUtil
  10. def genForComprehensionBodyOfReaderMethod(params: Seq[FieldWithType], paramIds: Iterable[scala.reflect.api.JavaUniverse.Ident], nameOfRecord: String, inner: scala.reflect.api.JavaUniverse.Tree): scala.reflect.api.JavaUniverse.Tree

    Produces the for-comprehension body of a "reader" method.

    Produces the for-comprehension body of a "reader" method.

    Example: Take two variables "a: Int64", "b: Numeric", a nameOfRecord of "m" This will produce:

    if (m.fields == 2) { for { RecordField("" | "a", Some(z0)) = m.fields(0) a <- Value.decode[Int64](zv0) RecordField("" | "b", Some(zv1)) = m.fields(1) b <- Value.decode[Numeric](zv1) } yield (...) // what the user passes in } else { None }

    Note that we index and pattern match rather than pattern matching on Seq because unapply patterns are limited to 22 arguments, and we might have records with more than 22 arguments.

    Annotations
    @throws(scala.this.throws.<init>$default$1[com.daml.codegen.exception.UnsupportedDamlTypeException])
  11. def genTemplateChoiceMethods(templateType: scala.reflect.api.JavaUniverse.Ident, idType: scala.reflect.api.JavaUniverse.TypeName, choiceId: ChoiceName, choiceInterface: FWT): Seq[scala.reflect.api.JavaUniverse.Tree]
  12. def genTypeToScalaType(genType: Type): scala.reflect.api.JavaUniverse.Tree

    This method is responsible for generating Scala reflection API "tree"s.

    This method is responsible for generating Scala reflection API "tree"s. It maps from Core package interface types to: a) the wrapper types defined in the typed-ledger-api project b) the classes that will be generated for the user defined types defined in the "typeDecls" field of the Package.PackageInterface value.

    Definition Classes
    LFUtilUtil
  13. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. val iface: EnvironmentInterface
    Definition Classes
    LFUtilUtil
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. def mkDamlScalaName(codeGenDeclKind: CodeGenDeclKind, metadataAlias: QualifiedName): DamlScalaName

    Convert the metadataAlias into a DamlScalaName based on the codeGenDeclKind.

    Convert the metadataAlias into a DamlScalaName based on the codeGenDeclKind.

    > mkDamlScalaName(Contract, QualifiedName.assertFromString("foo.bar:Test"))
    DamlScalaName("foo.bar", "TestContract")
    Definition Classes
    LFUtilUtil
  17. def mkDamlScalaName(codeGenDeclKind: CodeGenDeclKind, metadataAlias: Identifier): DamlScalaName
  18. def mkDamlScalaNameFromDirsAndName(nameSpace: Array[String], name: String): DamlScalaName
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. val outputDir: File
    Definition Classes
    LFUtilUtil
  23. val packageName: String
    Definition Classes
    LFUtilUtil
  24. val packageNameElems: Array[String]
    Definition Classes
    Util
  25. def paramRefAndGenTypeToArgumentValue(paramRef: scala.reflect.api.JavaUniverse.Tree, genType: Type): scala.reflect.api.JavaUniverse.Tree
    Definition Classes
    LFUtilUtil
  26. def precacheVariance(interface: Interface): (Name) => ImmArraySeq[Variance]
    Attributes
    protected[this]
    Definition Classes
    LFUtilUtil
  27. def productElementNames: Iterator[String]
    Definition Classes
    Product
  28. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  29. def templateAndTypeFiles(wp: WriteParams[TemplateInterface]): IterableOnce[FilePlan]
    Definition Classes
    LFUtilUtil
  30. def templateCount(interface: Interface): Int
    Definition Classes
    LFUtilUtil
  31. def toNamedArgumentsMap(params: List[FieldWithType], path: Option[scala.reflect.api.JavaUniverse.Tree]): scala.reflect.api.JavaUniverse.Tree
  32. def variance(sdt: ScopedDataType[_]): Seq[Variance]
    Definition Classes
    Util
  33. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  34. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  35. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Util

Inherited from AnyRef

Inherited from Any

Ungrouped