Class

com.twitter.scrooge.backend

TemplateGenerator

Related Doc: package backend

Permalink

abstract class TemplateGenerator extends Generator with StructTemplate with ServiceTemplate with ConstsTemplate with EnumTemplate

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TemplateGenerator
  2. EnumTemplate
  3. ConstsTemplate
  4. ServiceTemplate
  5. StructTemplate
  6. Generator
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TemplateGenerator(resolvedDoc: ResolvedDocument)

    Permalink

Type Members

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

    Permalink
    Definition Classes
    StructTemplate

Abstract Value Members

  1. abstract val defaultNamespace: String

    Permalink

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

  2. abstract val experimentFlags: Seq[String]

    Permalink
  3. abstract def fileExtension: String

    Permalink
  4. abstract def genBaseFinagleService: CodeFragment

    Permalink
  5. abstract def genEnum(enum: EnumRHS, fieldType: Option[FieldType] = None): CodeFragment

    Permalink
  6. abstract def genFieldParams(fields: Seq[Field], asVal: Boolean = false): CodeFragment

    Permalink
  7. abstract def genFieldType(f: Field): CodeFragment

    Permalink
  8. abstract def genList(list: ListRHS, fieldType: Option[FieldType] = None): CodeFragment

    Permalink
  9. abstract def genMap(map: MapRHS, fieldType: Option[FieldType] = None): CodeFragment

    Permalink
  10. abstract def genPrimitiveType(t: FunctionType): CodeFragment

    Permalink
  11. abstract def genSet(set: SetRHS, fieldType: Option[FieldType] = None): CodeFragment

    Permalink
  12. abstract def genStruct(struct: StructRHS, fieldType: Option[FieldType] = None): CodeFragment

    Permalink
  13. abstract def genType(t: FunctionType): CodeFragment

    Permalink
  14. abstract def genUnion(union: UnionRHS, fieldType: Option[FieldType] = None): CodeFragment

    Permalink
  15. abstract def getParentFinagleClient(parent: ServiceParent): CodeFragment

    Permalink
  16. abstract def getParentFinagleService(parent: ServiceParent): CodeFragment

    Permalink
  17. abstract def namespaceLanguage: String

    Permalink

    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
    Generator
  18. abstract def quoteKeyword(str: String): String

    Permalink
  19. abstract def templates: HandlebarLoader

    Permalink

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val TypeTemplate: Dictionary

    Permalink
    Definition Classes
    StructTemplate
  5. def apply(serviceOptions: Set[ServiceOption], outputPath: File, dryRun: Boolean = false): Iterable[File]

    Permalink
    Definition Classes
    TemplateGeneratorGenerator
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. val basePassthrough: Dictionary

    Permalink
    Definition Classes
    StructTemplate
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def constDict(namespace: Identifier, consts: Seq[ConstDefinition]): Dictionary

    Permalink
    Definition Classes
    ConstsTemplate
  10. def enumDict(namespace: Identifier, enum: Enum): Dictionary

    Permalink
    Definition Classes
    EnumTemplate
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. def fieldsToDict(fields: Seq[Field], blacklist: Seq[String], namespace: Option[Identifier] = None): Seq[Dictionary]

    Permalink
    Definition Classes
    StructTemplate
  14. def finagleClient(service: Service, namespace: Identifier): Dictionary

    Permalink
    Definition Classes
    ServiceTemplate
  15. def finagleClientFile(packageDir: File, service: Service, options: Set[ServiceOption]): Option[File]

    Permalink
  16. def finagleService(service: Service, namespace: Identifier): Dictionary

    Permalink
    Definition Classes
    ServiceTemplate
  17. def finagleServiceFile(packageDir: File, service: Service, options: Set[ServiceOption]): Option[File]

    Permalink
  18. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. def functionArgsStruct(f: Function): FunctionArgs

    Permalink
    Definition Classes
    ServiceTemplate
  20. def functionDictionary(function: Function, generic: Option[String]): Dictionary

    Permalink
    Definition Classes
    ServiceTemplate
  21. def functionObjectName(f: Function): SimpleID

    Permalink
    Definition Classes
    ServiceTemplate
  22. def genConstType(t: FunctionType): CodeFragment

    Permalink
  23. def genConstant(constant: RHS, fieldType: Option[FieldType] = None): CodeFragment

    Permalink
  24. def genDecodeProtocolMethod(t: FunctionType): CodeFragment

    Permalink
  25. def genDefaultFieldValue(f: Field): Option[CodeFragment]

    Permalink
  26. def genDefaultReadValue(f: Field): CodeFragment

    Permalink
  27. def genDefaultValue(fieldType: FieldType): CodeFragment

    Permalink

    The default value for the specified type and mutability.

  28. def genID(data: Identifier): CodeFragment

    Permalink
  29. def genOffsetSkipProtocolMethod(t: FunctionType): CodeFragment

    Permalink
  30. def genProtocolReadMethod(t: FunctionType): CodeFragment

    Permalink
  31. def genProtocolWriteMethod(t: FunctionType): CodeFragment

    Permalink
  32. def genQualifiedID(id: Identifier, namespace: Identifier): CodeFragment

    Permalink
  33. def genWireConstType(t: FunctionType): CodeFragment

    Permalink
    Definition Classes
    StructTemplate
  34. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  35. def getExceptionFields(result: FunctionResult): CodeFragment

    Permalink
    Definition Classes
    StructTemplate
  36. def getIncludeNamespace(includeFileName: String): Identifier

    Permalink
    Attributes
    protected
  37. def getNamespace(doc: Document): Identifier

    Permalink
  38. def getServiceParentID(parent: ServiceParent): Identifier

    Permalink
  39. def getSuccessType(result: FunctionResult): CodeFragment

    Permalink
    Definition Classes
    StructTemplate
  40. def getSuccessValue(result: FunctionResult): CodeFragment

    Permalink
    Definition Classes
    StructTemplate
  41. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  42. def includeMap: Map[String, ResolvedDocument]

    Permalink
    Definition Classes
    Generator
  43. def internalArgsStructNameForWire(f: Function): String

    Permalink

    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
  44. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  45. def isLazyReadEnabled(t: FunctionType, optional: Boolean): Boolean

    Permalink
  46. def isNullableType(t: FieldType, isOptional: Boolean = false): Boolean

    Permalink
  47. def isPrimitive(t: FunctionType): Boolean

    Permalink
  48. def namespacedFolder(destFolder: File, namespace: String, dryRun: Boolean): File

    Permalink

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

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

    Attributes
    protected
  49. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  50. def normalizeCase[N <: Node](node: N): N

    Permalink
  51. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  52. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  53. def productN(fields: Seq[Field], namespace: Option[Identifier]): String

    Permalink

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

  54. def qualifyNamedType(t: NamedType, namespace: Option[Identifier] = None): Identifier

    Permalink

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

  55. def quote(str: String): String

    Permalink
  56. def readWriteInfo[T <: FieldType](sid: SimpleID, t: FieldType): Dictionary

    Permalink
    Definition Classes
    StructTemplate
  57. val resolvedDoc: ResolvedDocument

    Permalink
  58. def resultStruct(f: Function): FunctionResult

    Permalink

    Thrift Result struct that includes success or exceptions returned.

    Thrift Result struct that includes success or exceptions returned.

    Definition Classes
    ServiceTemplate
  59. def serviceDict(service: Service, namespace: Identifier, includes: Seq[Include], options: Set[ServiceOption]): Dictionary

    Permalink
    Definition Classes
    ServiceTemplate
  60. def structDict(struct: StructLike, namespace: Option[Identifier], includes: Seq[Include], serviceOptions: Set[ServiceOption], toplevel: Boolean = false): Dictionary

    Permalink
    Definition Classes
    StructTemplate
  61. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  62. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  63. def unwrapArgs(arity: Int): String

    Permalink
    Definition Classes
    ServiceTemplate
  64. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  65. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  66. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  67. def writeFile(file: File, fileHeader: String, fileContent: String): Unit

    Permalink
    Attributes
    protected

Inherited from EnumTemplate

Inherited from ConstsTemplate

Inherited from ServiceTemplate

Inherited from StructTemplate

Inherited from Generator

Inherited from AnyRef

Inherited from Any

Ungrouped