com.meituan.firefly

Generator

Related Doc: package firefly

class Generator extends (Document, String) ⇒ Seq[File]

A generator is used to generate code from a specified thrift file.
It use mustache template language.

Linear Supertypes
(Document, String) ⇒ Seq[File], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Generator
  2. Function2
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Generator(defaultNameSpace: String = "thrift", output: File = new File("gen"), rxStyle: Boolean = false, androidSupport: Boolean = false)

    defaultNameSpace

    default namespace if the thrift file does not specify one

    output

    output dir for generated code

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. def apply(doc: Document, filename: String): Seq[File]

    generates code from the Document.

    generates code from the Document.

    doc
    returns

    Definition Classes
    Generator → Function2
  5. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  6. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def convertActualType(actualType: Type, actualDocument: Document, targetDoc: Document)(implicit exceptionContext: String): String

  8. def convertBaseType(baseType: BaseType): String

  9. def convertConst(const: Const, doc: Document)(implicit exceptionContext: String): Map[String, Any]

  10. def convertConstValue(fieldType: Type, value: ConstValue, doc: Document)(implicit exceptionContext: String = ""): String

  11. def convertConsts(baseMap: Map[String, Any], consts: Seq[Const], doc: Document)(implicit exceptionContext: String): Map[String, Any]

    converts a Const Node in the Document to a Map, which is applied to const.mustache template.

    converts a Const Node in the Document to a Map, which is applied to const.mustache template.

    baseMap
    consts
    doc
    returns

  12. def convertContainerType(containerType: ContainerType, contextDoc: Document, targetDoc: Document)(implicit exceptionContext: String): String

  13. def convertEnum(baseMap: Map[String, Any], enum: Enum, document: Document): Map[String, Any]

    converts a Enum Node in the Document to a Map, which is applied to enum.mustache template.

    converts a Enum Node in the Document to a Map, which is applied to enum.mustache template.

    baseMap
    enum
    document
    returns

  14. def convertField(field: Field, document: Document)(implicit exceptionContext: String): Map[String, Any]

  15. def convertFunction(function: Function, document: Document)(implicit exceptionContext: String): Map[String, Any]

  16. def convertService(baseMap: Map[String, Any], service: Service, document: Document)(implicit exceptionContext: String): Map[String, Any]

    converts a Service Node in the Document to a Map, which is applied to service.mustache template.

    converts a Service Node in the Document to a Map, which is applied to service.mustache template.

    baseMap
    service
    document
    returns

  17. def convertStructLike(baseMap: Map[String, Any], structLike: StructLike, document: Document)(implicit exceptionContext: String): Map[String, Any]

    converts a Struct/Union/Exception Node in the Document to a Map, which is applied to struct.mustache template.

    converts a Struct/Union/Exception Node in the Document to a Map, which is applied to struct.mustache template.

    baseMap
    structLike
    document
    returns

  18. def convertType(fieldType: Type, doc: Document)(implicit exceptionContext: String): String

  19. def convertType(fieldType: Type, contextDoc: Document, targetDoc: Document)(implicit exceptionContext: String): String

  20. def curried: (Document) ⇒ (String) ⇒ Seq[File]

    Definition Classes
    Function2
    Annotations
    @unspecialized()
  21. val engine: TemplateEngine

  22. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  24. def fillFieldsIds(fields: Seq[Field]): Seq[Field]

  25. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  26. def findActualType(fieldType: Type, document: Document)(implicit exceptionContext: String): (Type, Document)

  27. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  28. def getInclude(doc: Document, fileName: String)(implicit exceptionContext: String): Include

  29. def getNameSpace(doc: Document): String

  30. def getNameSpaceFolder(nameSpace: String): File

  31. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  32. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  33. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  34. final def notify(): Unit

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

    Definition Classes
    AnyRef
  36. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  37. def toString(): String

    Definition Classes
    Function2 → AnyRef → Any
  38. def tupled: ((Document, String)) ⇒ Seq[File]

    Definition Classes
    Function2
    Annotations
    @unspecialized()
  39. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. def writeFile(file: File, content: String): Unit

Inherited from (Document, String) ⇒ Seq[File]

Inherited from AnyRef

Inherited from Any

Ungrouped