RuntimeEnumAdapter

Converts values of an enum to and from integers using reflection.

Constructors

Link copied to clipboard
constructor(javaType: Class<E>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
actual val identity: E?
Link copied to clipboard
actual val sourceFile: String?
Link copied to clipboard
actual val syntax: Syntax
Link copied to clipboard
actual val type: KClass<*>?
Link copied to clipboard
actual val typeUrl: String?

Functions

Link copied to clipboard
actual fun asPacked(): ProtoAdapter<List<E>>
Link copied to clipboard
actual fun asRepeated(): ProtoAdapter<List<E>>
Link copied to clipboard
actual open override fun decode(reader: ProtoReader): E
fun decode(stream: InputStream): E
actual fun decode(bytes: ByteArray): E
actual fun decode(source: BufferedSource): E
actual fun decode(bytes: ByteString): E
Link copied to clipboard
fun <E> ProtoAdapter<E>.decode(data: <Error class: unknown class>): E

Read an encoded message from data.

Link copied to clipboard
actual open override fun encode(writer: ProtoWriter, value: E)
actual open override fun encode(writer: ReverseProtoWriter, value: E)
actual fun encode(value: E): ByteArray
fun encode(stream: OutputStream, value: E)
actual fun encode(sink: BufferedSink, value: E)
Link copied to clipboard
actual fun encodeByteString(value: E): ByteString
Link copied to clipboard
actual open override fun encodedSize(value: E): Int
Link copied to clipboard
actual open fun encodedSizeWithTag(tag: Int, value: E?): Int
Link copied to clipboard
actual open fun encodeWithTag(writer: ProtoWriter, tag: Int, value: E?)
actual open fun encodeWithTag(writer: ReverseProtoWriter, tag: Int, value: E?)
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
actual open override fun redact(value: E): E
Link copied to clipboard
actual open fun toString(value: E): String
Link copied to clipboard
actual fun tryDecode(reader: ProtoReader, destination: MutableList<E>)