c

com.twitter.scrooge.backend

ScalaGenerator

class ScalaGenerator extends TemplateGenerator

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ScalaGenerator
  2. TemplateGenerator
  3. EnumTemplate
  4. ConstsTemplate
  5. ServiceTemplate
  6. StructTemplate
  7. Generator
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new ScalaGenerator(resolvedDoc: ResolvedDocument, defaultNamespace: String, languageFlags: Seq[String], templatesLoader: HandlebarLoader)

Type Members

  1. case class Binding[FT <: FieldType](name: String, fieldType: FT) extends Product with Serializable
    Definition Classes
    StructTemplate

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. val TypeTemplate: Dictionary
    Definition Classes
    StructTemplate
  5. def apply(serviceOptions: Set[ServiceOption], outputPath: File, dryRun: Boolean = false, genAdapt: Boolean = false): Iterable[File]

    genAdapt

    Generate code for Adaptive Decoding. This flag is only used for scala presently.

    Definition Classes
    TemplateGeneratorGenerator
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. val basePassthrough: Dictionary
    Definition Classes
    StructTemplate
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  9. def constDict(namespace: Identifier, consts: Seq[ConstDefinition]): Dictionary
    Definition Classes
    ConstsTemplate
  10. val defaultNamespace: String

    Map from included file names to the namespaces defined in those files.

    Map from included file names to the namespaces defined in those files.

    Definition Classes
    ScalaGeneratorTemplateGenerator
  11. def enumDict(namespace: Identifier, enum: Enum): Dictionary
    Definition Classes
    EnumTemplate
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  14. def fieldsToDict(fields: Seq[Field], blacklist: Seq[String], namespace: Option[Identifier] = None): Seq[Dictionary]
    Definition Classes
    StructTemplate
  15. val fileExtension: String
    Definition Classes
    ScalaGeneratorTemplateGenerator
  16. def finagleClient(service: Service, namespace: Identifier, withAsClosable: Boolean): Dictionary
    Definition Classes
    ServiceTemplate
  17. def finagleClientFile(packageDir: File, service: Service, options: Set[ServiceOption]): Option[File]
    Definition Classes
    ScalaGeneratorTemplateGenerator
  18. def finagleService(service: Service, namespace: Identifier): Dictionary
    Definition Classes
    ServiceTemplate
  19. def finagleServiceFile(packageDir: File, service: Service, options: Set[ServiceOption]): Option[File]
    Definition Classes
    ScalaGeneratorTemplateGenerator
  20. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  21. def functionArgsStruct(f: Function): FunctionArgs
    Definition Classes
    ServiceTemplate
  22. def functionDictionary(function: Function, generic: Option[String]): Dictionary
    Definition Classes
    ServiceTemplate
  23. def functionObjectName(f: Function): SimpleID
    Definition Classes
    ServiceTemplate
  24. def genBaseFinagleService: CodeFragment
    Definition Classes
    ScalaGeneratorTemplateGenerator
  25. def genConstType(t: FunctionType): CodeFragment
    Definition Classes
    TemplateGenerator
  26. def genConstant(constant: RHS, fieldType: Option[FieldType] = None): CodeFragment
    Definition Classes
    ScalaGeneratorTemplateGenerator
  27. def genDecodeProtocolMethod(t: FunctionType): CodeFragment
    Definition Classes
    TemplateGenerator
  28. def genDefaultFieldValue(f: Field, forAlternateConstructor: Boolean = false): Option[CodeFragment]

    Creates a code fragment for the default value of the field.

    Creates a code fragment for the default value of the field.

    f

    field to generate the default value for.

    forAlternateConstructor

    Whether this is for the alternate Immutable constructor which does not take an Option for construction required fields.

    Definition Classes
    TemplateGenerator
  29. def genDefaultFieldValueForFieldInfo(f: Field): Option[CodeFragment]
    Definition Classes
    TemplateGenerator
  30. def genDefaultReadValue(f: Field): CodeFragment
    Definition Classes
    TemplateGenerator
  31. def genDefaultValue(fieldType: FieldType): CodeFragment

    The default value for the specified type and mutability.

    The default value for the specified type and mutability.

    Definition Classes
    ScalaGeneratorTemplateGenerator
  32. def genEnum(enum: EnumRHS, fieldType: Option[FieldType] = None): CodeFragment
    Definition Classes
    ScalaGeneratorTemplateGenerator
  33. def genFieldParams(fields: Seq[Field], asVal: Boolean = false): CodeFragment
    Definition Classes
    ScalaGeneratorTemplateGenerator
  34. def genFieldType(f: Field): CodeFragment
    Definition Classes
    ScalaGeneratorTemplateGenerator
  35. def genID(data: Identifier): CodeFragment
    Definition Classes
    TemplateGenerator
  36. def genList(list: ListRHS, fieldType: Option[FieldType] = None): CodeFragment
    Definition Classes
    ScalaGeneratorTemplateGenerator
  37. def genMap(map: MapRHS, fieldType: Option[FieldType] = None): CodeFragment
    Definition Classes
    ScalaGeneratorTemplateGenerator
  38. def genOffsetSkipProtocolMethod(t: FunctionType): CodeFragment
    Definition Classes
    TemplateGenerator
  39. def genPrimitiveType(t: FunctionType): CodeFragment
    Definition Classes
    ScalaGeneratorTemplateGenerator
  40. def genProtocolReadMethod(t: FunctionType): CodeFragment
    Definition Classes
    TemplateGenerator
  41. def genProtocolSkipMethod(t: FunctionType): CodeFragment
    Definition Classes
    TemplateGenerator
  42. def genProtocolWriteMethod(t: FunctionType): CodeFragment
    Definition Classes
    TemplateGenerator
  43. def genQualifiedID(id: Identifier, namespace: Identifier): CodeFragment
    Definition Classes
    TemplateGenerator
  44. def genSet(set: SetRHS, fieldType: Option[FieldType] = None): CodeFragment
    Definition Classes
    ScalaGeneratorTemplateGenerator
  45. def genStruct(struct: StructRHS, fieldType: Option[FieldType] = None): CodeFragment
    Definition Classes
    ScalaGeneratorTemplateGenerator
  46. def genType(t: FunctionType, immutable: Boolean = false): CodeFragment
    Definition Classes
    ScalaGeneratorTemplateGenerator
  47. def genUnion(union: UnionRHS, fieldType: Option[FieldType] = None): CodeFragment
    Definition Classes
    ScalaGeneratorTemplateGenerator
  48. def genUnsafeEmptyReadValue(f: Field): CodeFragment
    Definition Classes
    TemplateGenerator
  49. def genUnsafeEmptyValue(fieldType: FieldType): CodeFragment

    The default value for the unsafe empty value case.

    The default value for the unsafe empty value case. These predefined values will be used to create field blob. For String, null is not valid value for required field.

    Definition Classes
    TemplateGenerator
  50. def genWireConstType(t: FunctionType): CodeFragment
    Definition Classes
    StructTemplate
  51. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  52. def getExceptionFields(result: FunctionResult): CodeFragment
    Definition Classes
    StructTemplate
  53. def getIncludeNamespace(includeFileName: String): Identifier
    Attributes
    protected
    Definition Classes
    ScalaGeneratorTemplateGenerator
  54. def getNamespace(doc: Document): Identifier
    Definition Classes
    ScalaGeneratorTemplateGenerator
  55. def getParentFinagleClient(p: ServiceParent): CodeFragment
    Definition Classes
    ScalaGeneratorTemplateGenerator
  56. def getParentFinagleService(p: ServiceParent): CodeFragment
    Definition Classes
    ScalaGeneratorTemplateGenerator
  57. def getServiceParentID(parent: ServiceParent): Identifier
    Definition Classes
    TemplateGenerator
  58. def getSuccessType(result: FunctionResult): CodeFragment
    Definition Classes
    StructTemplate
  59. def getSuccessValue(result: FunctionResult): CodeFragment
    Definition Classes
    StructTemplate
  60. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  61. def includeMap: Map[String, ResolvedDocument]
    Definition Classes
    Generator
  62. def internalArgsStructNameForWire(f: Function): String

    The name used in RPC request, this needs to be same as Apache compiler

    The name used in RPC request, this needs to be same as Apache compiler

    Definition Classes
    ServiceTemplate
  63. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  64. def isLazyReadEnabled(t: FunctionType, optional: Boolean): Boolean
    Definition Classes
    TemplateGenerator
  65. def isNullableType(t: FieldType, isOptional: Boolean = false): Boolean
    Definition Classes
    TemplateGenerator
  66. def isPrimitive(t: FunctionType): Boolean
    Definition Classes
    TemplateGenerator
  67. val languageFlags: Seq[String]
    Definition Classes
    ScalaGeneratorTemplateGenerator
  68. val namespaceLanguage: String

    Used to find the namespace in included files.

    Used to find the namespace in included files. This does not need to match the corresponding GeneratorFactory.language.

    Definition Classes
    ScalaGeneratorGenerator
  69. def namespacedFolder(destFolder: File, namespace: String, dryRun: Boolean): File

    ****************** helper functions ***********************

    ****************** helper functions ***********************

    Attributes
    protected
    Definition Classes
    TemplateGenerator
  70. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  71. def normalizeCase[N <: Node](node: N): N
    Definition Classes
    TemplateGenerator
  72. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  73. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  74. def productN(fields: Seq[Field], namespace: Option[Identifier]): String

    Returns a String "_root_.scala.Product${N}[Type1, Type2, ...]" or "scala.Product".

    Returns a String "_root_.scala.Product${N}[Type1, Type2, ...]" or "scala.Product".

    Definition Classes
    TemplateGenerator
  75. def qualifyNamedType(t: NamedType, namespace: Option[Identifier] = None): Identifier

    When a named type is imported via include statement, we need to qualify it using its full namespace

    When a named type is imported via include statement, we need to qualify it using its full namespace

    Definition Classes
    TemplateGenerator
  76. def quote(str: String): String
    Definition Classes
    TemplateGenerator
  77. def quoteKeyword(str: String): String
    Definition Classes
    ScalaGeneratorTemplateGenerator
  78. def readWriteInfo[T <: FieldType](sid: SimpleID, t: FieldType): Dictionary
    Definition Classes
    StructTemplate
  79. val resolvedDoc: ResolvedDocument
    Definition Classes
    ScalaGeneratorTemplateGenerator
  80. def resultStruct(f: Function): FunctionResult

    Thrift Result struct that includes success or exceptions returned.

    Thrift Result struct that includes success or exceptions returned.

    Definition Classes
    ServiceTemplate
  81. def serviceDict(service: Service, namespace: Identifier, includes: Seq[Include], options: Set[ServiceOption], genAdapt: Boolean): Dictionary
    Definition Classes
    ServiceTemplate
  82. def structDict(struct: StructLike, namespace: Option[Identifier], includes: Seq[Include], serviceOptions: Set[ServiceOption], genAdapt: Boolean, toplevel: Boolean = false): Dictionary
    Definition Classes
    StructTemplate
  83. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  84. def templates: HandlebarLoader
    Definition Classes
    ScalaGeneratorTemplateGenerator
  85. val templatesLoader: HandlebarLoader
  86. def toString(): String
    Definition Classes
    AnyRef → Any
  87. def tupleN(fields: Seq[Field], namespace: Option[Identifier]): String

    Returns a String "_root_.scala.Tuple${N}[Type1, Type2, ...]"

    Returns a String "_root_.scala.Tuple${N}[Type1, Type2, ...]"

    Definition Classes
    TemplateGenerator
  88. def unwrapArgs(arity: Int): String
    Definition Classes
    ServiceTemplate
  89. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  90. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  91. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  92. var warnOnJavaNamespaceFallback: Boolean
  93. def writeFile(file: File, fileHeader: String, fileContent: String): Unit
    Attributes
    protected
    Definition Classes
    TemplateGenerator

Inherited from TemplateGenerator

Inherited from EnumTemplate

Inherited from ConstsTemplate

Inherited from ServiceTemplate

Inherited from StructTemplate

Inherited from Generator

Inherited from AnyRef

Inherited from Any

Ungrouped