com.twitter.scrooge.backend

CocoaGenerator

class CocoaGenerator extends TemplateGenerator

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. CocoaGenerator
  2. TemplateGenerator
  3. EnumTemplate
  4. ConstsTemplate
  5. ServiceTemplate
  6. StructTemplate
  7. Generator
  8. AnyRef
  9. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CocoaGenerator(doc: ResolvedDocument, defaultNamespace: String, headerTemplateLoader: HandlebarLoader, implementationTemplateLoader: HandlebarLoader)

Type Members

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

    Definition Classes
    StructTemplate
  2. implicit class RichDictionary extends AnyRef

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. val TypeTemplate: Dictionary

    Definition Classes
    StructTemplate
  7. 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
    CocoaGeneratorTemplateGeneratorGenerator
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. val basePassthrough: Dictionary

    Definition Classes
    StructTemplate
  10. def clone(): AnyRef

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

    Definition Classes
    ConstsTemplate
  12. var currentNamespace: String

  13. 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
    CocoaGeneratorTemplateGenerator
  14. val doc: ResolvedDocument

  15. def enumDict(namespace: Identifier, enum: Enum): Dictionary

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

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

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

    Definition Classes
    CocoaGeneratorStructTemplate
  19. val fileExtension: String

    Definition Classes
    CocoaGeneratorTemplateGenerator
  20. def finagleClient(service: Service, namespace: Identifier, withAsClosable: Boolean): Dictionary

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

    Definition Classes
    TemplateGenerator
  22. def finagleService(service: Service, namespace: Identifier): Dictionary

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

    Definition Classes
    TemplateGenerator
  24. def finalize(): Unit

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

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

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

    Definition Classes
    ServiceTemplate
  28. def genBaseFinagleService: CodeFragment

    Definition Classes
    CocoaGeneratorTemplateGenerator
  29. def genConstType(t: FunctionType): CodeFragment

    Definition Classes
    TemplateGenerator
  30. def genConstant(constant: RHS, fieldType: Option[FieldType] = None): CodeFragment

    Definition Classes
    TemplateGenerator
  31. def genDecodeProtocolMethod(t: FunctionType): CodeFragment

    Definition Classes
    TemplateGenerator
  32. 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
  33. def genDefaultFieldValueForFieldInfo(f: Field): Option[CodeFragment]

    Definition Classes
    TemplateGenerator
  34. def genDefaultReadValue(f: Field): CodeFragment

    Definition Classes
    TemplateGenerator
  35. 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
    TemplateGenerator
  36. def genEnum(enum: EnumRHS, fieldType: Option[FieldType] = None): CodeFragment

    Definition Classes
    CocoaGeneratorTemplateGenerator
  37. def genFieldParams(fields: Seq[Field], asVal: Boolean = false): CodeFragment

    Definition Classes
    CocoaGeneratorTemplateGenerator
  38. def genFieldType(f: Field): CodeFragment

    Definition Classes
    CocoaGeneratorTemplateGenerator
  39. def genID(data: Identifier): CodeFragment

    Definition Classes
    TemplateGenerator
  40. def genList(list: ListRHS, fieldType: Option[FieldType] = None): CodeFragment

    Definition Classes
    CocoaGeneratorTemplateGenerator
  41. def genMap(map: MapRHS, fieldType: Option[FieldType] = None): CodeFragment

    Definition Classes
    CocoaGeneratorTemplateGenerator
  42. def genOffsetSkipProtocolMethod(t: FunctionType): CodeFragment

    Definition Classes
    TemplateGenerator
  43. def genPrimitiveType(t: FunctionType): CodeFragment

    Definition Classes
    CocoaGeneratorTemplateGenerator
  44. def genProtocolReadMethod(t: FunctionType): CodeFragment

    Definition Classes
    TemplateGenerator
  45. def genProtocolSkipMethod(t: FunctionType): CodeFragment

    Definition Classes
    TemplateGenerator
  46. def genProtocolWriteMethod(t: FunctionType): CodeFragment

    Definition Classes
    TemplateGenerator
  47. def genQualifiedID(id: Identifier, namespace: Identifier): CodeFragment

    Definition Classes
    TemplateGenerator
  48. def genSet(set: SetRHS, fieldType: Option[FieldType]): CodeFragment

    Definition Classes
    CocoaGeneratorTemplateGenerator
  49. def genStruct(struct: StructRHS, fieldType: Option[FieldType] = None): CodeFragment

    Definition Classes
    CocoaGeneratorTemplateGenerator
  50. def genToImmutable(f: Field): CodeFragment

  51. def genToImmutable(t: FieldType): CodeFragment

  52. def genType(t: FunctionType, immutable: Boolean = false): CodeFragment

    Definition Classes
    CocoaGeneratorTemplateGenerator
  53. def genUnion(struct: UnionRHS, fieldType: Option[FieldType] = None): CodeFragment

    Definition Classes
    CocoaGeneratorTemplateGenerator
  54. def genUnsafeEmptyReadValue(f: Field): CodeFragment

    Definition Classes
    TemplateGenerator
  55. 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
  56. def genWireConstType(t: FunctionType): CodeFragment

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

    Definition Classes
    AnyRef → Any
  58. def getDependentHeaders(struct: StructLike): String

  59. def getDependentTypes(struct: StructLike): Set[FieldType]

  60. def getExceptionFields(result: FunctionResult): CodeFragment

    Definition Classes
    StructTemplate
  61. def getFieldNSCoderMethod(f: Field, isDecode: Boolean = false): String

  62. def getIncludeNamespace(includeFileName: String): Identifier

    Definition Classes
    CocoaGeneratorTemplateGenerator
  63. def getNamespace(doc: Document): Identifier

    Definition Classes
    CocoaGeneratorTemplateGenerator
  64. def getParentFinagleClient(p: ServiceParent): CodeFragment

    Definition Classes
    CocoaGeneratorTemplateGenerator
  65. def getParentFinagleService(p: ServiceParent): CodeFragment

    Definition Classes
    CocoaGeneratorTemplateGenerator
  66. def getServiceParentID(parent: ServiceParent): Identifier

    Definition Classes
    TemplateGenerator
  67. def getSuccessType(result: FunctionResult): CodeFragment

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

    Definition Classes
    StructTemplate
  69. def getTypeValueMethod(t: FieldType, name: String): String

  70. def getValidator(doc: Document): Option[Identifier]

    Definition Classes
    TemplateGenerator
  71. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  72. val headerExtension: String

  73. val headerTemplateLoader: HandlebarLoader

  74. val implementationTemplateLoader: HandlebarLoader

  75. def includeMap: Map[String, ResolvedDocument]

    Definition Classes
    Generator
  76. 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
  77. final def isInstanceOf[T0]: Boolean

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

    Definition Classes
    CocoaGeneratorTemplateGenerator
  79. def isNullValid(f: Field): Boolean

    Definition Classes
    TemplateGenerator
  80. def isNullableType(f: Field): Boolean

    Definition Classes
    TemplateGenerator
  81. def isPrimitive(t: FunctionType): Boolean

    Definition Classes
    TemplateGenerator
  82. val languageFlags: Seq[String]

    Definition Classes
    CocoaGeneratorTemplateGenerator
  83. 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
    CocoaGeneratorGenerator
  84. def namespacedFolder(destFolder: File, namespace: String, dryRun: Boolean): File

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

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

    Attributes
    protected
    Definition Classes
    TemplateGenerator
  85. final def ne(arg0: AnyRef): Boolean

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

    Definition Classes
    CocoaGeneratorTemplateGenerator
  87. final def notify(): Unit

    Definition Classes
    AnyRef
  88. final def notifyAll(): Unit

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

    Returns a String "_root_.

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

    Definition Classes
    TemplateGenerator
  90. 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
    CocoaGeneratorTemplateGenerator
  91. def quote(str: String): String

    Definition Classes
    TemplateGenerator
  92. def quoteKeyword(str: String): String

    Definition Classes
    CocoaGeneratorTemplateGenerator
  93. def readWriteInfo[T <: FieldType](sid: SimpleID, t: FieldType): Dictionary

    Definition Classes
    CocoaGeneratorStructTemplate
  94. val resolvedDoc: ResolvedDocument

    Definition Classes
    TemplateGenerator
  95. 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
  96. def serviceDict(service: Service, namespace: Identifier, includes: Seq[Include], options: Set[ServiceOption], genAdapt: Boolean): Dictionary

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

    Definition Classes
    CocoaGeneratorStructTemplate
  98. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  99. val templateDirName: String

  100. def templates: HandlebarLoader

    Definition Classes
    CocoaGeneratorTemplateGenerator
  101. def toMutable(f: Field): (String, String)

  102. def toMutable(t: FieldType): (String, String)

  103. def toString(): String

    Definition Classes
    AnyRef → Any
  104. def tupleN(fields: Seq[Field], namespace: Option[Identifier]): String

    Returns a String "_root_.

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

    Definition Classes
    TemplateGenerator
  105. def unwrapArgs(arity: Int): String

    Definition Classes
    ServiceTemplate
  106. def validateStructAnnotations(structs: Seq[StructLike]): Unit

    Attributes
    protected
    Definition Classes
    Generator
  107. final def wait(): Unit

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

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

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

    Attributes
    protected
    Definition Classes
    CocoaGeneratorTemplateGenerator

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