Class/Object

org.coursera.courier.generator.specs

Definition

Related Docs: object Definition | package specs

Permalink

abstract class Definition extends Deprecatable

Pegasus provides ClassTemplateSpecs to "flatten" the data schemas provided to a data binding generator and make it easier to write the generator.

These Definitions classes wrap ClassTemplateSpecs so that we can use idiomatic scala types in our templates. They also add language specific escaping and convenience functions specifically for generating data bindings for Scala.

This trait is for all Scala classes that wrap ClassTemplateSpec and it's sub-classes, it represents the common properties shared by all pegasus data binding generator utility types.

Linear Supertypes
Deprecatable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Definition
  2. Deprecatable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Definition(spec: ClassTemplateSpec)

    Permalink

Abstract Value Members

  1. abstract def directReferencedTypes: Set[Definition]

    Permalink

    Return types this type references.

    Return types this type references. For a record, this will return the types of all the fields. For a array, this will return the items type.

  2. abstract def rawDataType: String

    Permalink

    The raw pegasus "data" type that is stored in the underlying DataMap or DataList.

    The raw pegasus "data" type that is stored in the underlying DataMap or DataList.

    For custom types, this is the raw type of fully dereferenced type.

    For primitives, this is the java boxed type, e.g. java.lang.Integer.

    For complex types, this is the raw, type, e.g. DataMap for records, DataList for arrays.

  3. abstract def scalaDoc: Option[String]

    Permalink

    Includes the opening and closing scaladoc comment tags.

  4. abstract def schema: Option[DataSchema]

    Permalink

    The schema of the type.

    The schema of the type. Not present for definitions of "raw" classes, such as the 'coercer' and 'class' of a custom type.

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. def allReferencedTypes: Set[Definition]

    Permalink

    Return all types directly or transitively referenced by this type.

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def containedTypes: Set[Definition]

    Permalink

    All types that should be generated as types inside this type.

  8. def dataType: String

    Permalink

    The pegasus "data" type.

    The pegasus "data" type.

    This if sometimes the same as scalaType. It will be different for custom type and for primitive types.

    For custom types, it will be the referenced type.

    For primitives, this will be the java boxed type, e.g. java.lang.Integer whereas the scalaType would be Int.

  9. def deprecationMessage: Option[String]

    Permalink

    Is is possible for a type to be deprecated but have not deprecation message, so even if this is None, isDeprecated still might be true.

    Is is possible for a type to be deprecated but have not deprecation message, so even if this is None, isDeprecated still might be true.

    Definition Classes
    Deprecatable
  10. def enclosingDefinition: Option[Definition]

    Permalink

    The containing type of this type, if any.

    The containing type of this type, if any.

    When a type is contained in another type, it should be generated as a subtype of that type.

    Unions are commonly generated as contained types.

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

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

    Permalink
    Definition Classes
    Definition → AnyRef → Any
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Permalink
    Definition Classes
    Definition → AnyRef → Any
  16. def isDeprecated: Boolean

    Permalink
    Definition Classes
    Deprecatable
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. def isTopLevel: Boolean

    Permalink
  19. def memberName: String

    Permalink

    The name that should be given to any Union member wrappers of this type.

  20. def namespace: Option[String]

    Permalink

    The namespace of the scala type, if any.

    The namespace of the scala type, if any.

    Only present for complex types.

  21. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  24. def properties: Map[String, AnyRef]

    Permalink
    Definition Classes
    DefinitionDeprecatable
  25. def scalaGenericCollectionType: String

    Permalink

    The scala Generic collection type that corresponds to the type.

    The scala Generic collection type that corresponds to the type. This is the same as scalaTypeFullname for all types except maps and arrays, which are represented by Map[K, V] and Traversable[I] instead of by their pegasus generated binding types.

  26. def scalaType: String

    Permalink

    The scala type without namespace.

    The scala type without namespace.

    For complex types, this is the name of the generated data binding class.

    For primitive types, this is the Scala native type, e.g. "Int".

  27. def scalaTypeFullname: String

    Permalink

    The fully qualified name of the scala type.

  28. val spec: ClassTemplateSpec

    Permalink
  29. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  31. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Deprecatable

Inherited from AnyRef

Inherited from Any

Ungrouped