EnumSchema

class EnumSchema<T : Enum<T>>(val enumClass: Class<out Enum<T>>) : FateSchema<Enum<T>>

Constructors

Link copied to clipboard
constructor(enumClass: Class<out Enum<T>>)

Properties

Link copied to clipboard
val enumClass: Class<out Enum<T>>
Link copied to clipboard
open override val schema: ByteArray

The complete schema definition as a byte array.

Link copied to clipboard
open override val schemaSize: Int

Number of bytes required to encode this schema's metadata.

Link copied to clipboard
open override val tag: Int

Unique identifier for this schema type within the FateWeaver format.

Functions

Link copied to clipboard
open override fun encodeObject(buffer: ByteBuffer, obj: Enum<T>)

Encodes the given object into the provided buffer.

Link copied to clipboard
open fun encodeSchema(buffer: ByteBuffer)

Encodes this schema's metadata into the provided buffer.

Link copied to clipboard
open override fun objSize(obj: Enum<T>): Int

Calculates the number of bytes required to encode the given object.