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.
- Alphabetic
- By Inheritance
- LFUtil
- Serializable
- Product
- Equals
- Util
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new LFUtil(packageName: String, iface: EnvironmentInterface, outputDir: File)
Type Members
- 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
- type Interface = EnvironmentInterface
- type RefType = TypeConNameOrPrimType
- Definition Classes
- Util
- type TemplateInterface = DefTemplateWithRecord[Type]
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def genArgsWithTypes(fields: Seq[FieldWithType]): Seq[scala.reflect.api.JavaUniverse.Typed]
- def genArgumentValueToGenType(genType: Type): scala.reflect.api.JavaUniverse.Tree
Generate the function that converts an
ArgumentValue
into the givenType
- 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])
- def genTemplateChoiceMethods(templateType: scala.reflect.api.JavaUniverse.Ident, idType: scala.reflect.api.JavaUniverse.TypeName, choiceId: ChoiceName, choiceInterface: FWT): Seq[scala.reflect.api.JavaUniverse.Tree]
- 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.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val iface: EnvironmentInterface
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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")
- def mkDamlScalaName(codeGenDeclKind: CodeGenDeclKind, metadataAlias: Identifier): DamlScalaName
- def mkDamlScalaNameFromDirsAndName(nameSpace: Array[String], name: String): DamlScalaName
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val outputDir: File
- val packageName: String
- val packageNameElems: Array[String]
- Definition Classes
- Util
- def paramRefAndGenTypeToArgumentValue(paramRef: scala.reflect.api.JavaUniverse.Tree, genType: Type): scala.reflect.api.JavaUniverse.Tree
- def precacheVariance(interface: Interface): (Name) => ImmArraySeq[Variance]
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def templateAndTypeFiles(wp: WriteParams[TemplateInterface]): IterableOnce[FilePlan]
- def templateCount(interface: Interface): Int
- def toNamedArgumentsMap(params: List[FieldWithType], path: Option[scala.reflect.api.JavaUniverse.Tree]): scala.reflect.api.JavaUniverse.Tree
- def variance(sdt: ScopedDataType[_]): Seq[Variance]
- Definition Classes
- Util
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()