com.gensler.scalavro.types

AvroType

abstract class AvroType[T] extends JsonSchemifiable with CanonicalForm

Abstract parent class of all Avro types. An AvroType wraps a corresponding type from the Scala type system.

To obtain an AvroType instance use the apply or fromType method, defined on the AvroType companion object.

import com.gensler.scalavro.types.AvroType

val avroString = AvroType[String]
avroString.schema
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. AvroType
  2. CanonicalForm
  3. JsonSchemifiable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AvroType()(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T])

Type Members

  1. type scalaType = T

    The corresponding Scala type for this Avro type.

Abstract Value Members

  1. abstract def dependsOn(thatType: AvroType[_]): Boolean

    Returns true if this type depends upon the supplied type.

  2. abstract def isPrimitive(): Boolean

    Returns true if this represents a primitive Avro type.

  3. abstract def schema(): JsValue

    Returns the JSON representation of this Avro type schema.

    Returns the JSON representation of this Avro type schema.

    Definition Classes
    AvroTypeJsonSchemifiable
  4. abstract def selfContainedSchema(resolvedSymbols: Set[String] = mutable.Set[String]()): JsValue

    Returns the fully self-describing JSON representation of this Avro type schema.

  5. abstract def typeName(): String

    Returns the Avro type name for this schema.

Concrete 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. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def canonicalFormOrFullyQualifiedName(): JsValue

    Returns the fully qualified schema name if this is an instance of AvroNamedType, or the parsing canonical form of this type schema otherwise.

    Internal API

    Returns the fully qualified schema name if this is an instance of AvroNamedType, or the parsing canonical form of this type schema otherwise.

    Attributes
    protected[com.gensler.scalavro]
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. lazy val dependentNamedTypes: Seq[AvroNamedType[_]]

    Returns the sequence of named types that are required to fully specify this AvroType, including recursive/transitive type dependencies.

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

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final lazy val fingerprint: Array[Byte]

    Returns the result of computing MD5 over this type's parsing canonical form.

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

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

    Definition Classes
    AnyRef → Any
  16. lazy val io: AvroTypeIO[T]

    Returns an AvroTypeIO instance for this AvroType.

  17. final def isInstanceOf[T0]: Boolean

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

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

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

    Definition Classes
    AnyRef
  21. def parsingCanonicalForm(): JsValue

    Returns the JSON schema for this type in "parsing canonical form".

    Returns the JSON schema for this type in "parsing canonical form".

    _X_ [PRIMITIVES] Convert primitive schemas to their simple form (e.g., int instead of {"type":"int"}).

    _X_ [FULLNAMES] Replace short names with fullnames, using applicable namespaces to do so. Then eliminate namespace attributes, which are now redundant.

    _X_ [STRIP] Keep only attributes that are relevant to parsing data, which are: type, name, fields, symbols, items, values, size. Strip all others (e.g., doc and aliases).

    _X_ [ORDER] Order the appearance of fields of JSON objects as follows: name, type, fields, symbols, items, values, size. For example, if an object has type, name, and size fields, then the name field should appear first, followed by the type and then the size fields.

    _X_ [INTEGERS] Eliminate quotes around and any leading zeros in front of JSON integer literals (which appear in the size attributes of fixed schemas).

    _X_ [WHITESPACE] Eliminate all whitespace in JSON outside of string literals.

    Definition Classes
    AvroTypeCanonicalForm
  22. def schemaOrName(): JsValue

    Returns the schema name if this is an instance of AvroNamedType, or the expanded schema otherwise.

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

    Definition Classes
    AnyRef
  24. final val tag: scala.reflect.api.JavaUniverse.TypeTag[T]

  25. def toString(): String

    Definition Classes
    AvroType → AnyRef → Any
  26. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. def writeCanonicalForm(os: OutputStream): Unit

    _X_ [STRINGS] For all JSON string literals in the schema text, replace any escaped characters (e.

    _X_ [STRINGS] For all JSON string literals in the schema text, replace any escaped characters (e.g., \\uXXXX escapes) with their UTF-8 equivalents.

Inherited from CanonicalForm

Inherited from JsonSchemifiable

Inherited from AnyRef

Inherited from Any

Ungrouped