RemoteDescriptor.Builder

class RemoteDescriptor.Builder


Builder for RemoteDescriptor

Summary

Public constructors

Public functions

RemoteDescriptor!

Builds a RemoteDescriptor from the builder properties set.

RemoteDescriptor.Builder!

Sets the FieldDescriptors associated with this RemoteDescriptor.

RemoteDescriptor.Builder!
setInstanceType(instanceType: Class<Any!>)

Sets the instance type for associated with this RemoteDescriptor.

RemoteDescriptor.Builder!
setProtoBuilderType(protoBuilderType: Class<Any!>)

Sets the type of the proto message builder associated with this RemoteDescriptor.

RemoteDescriptor.Builder!
setProtoParser(protoParser: Parser<Any!>)

Sets the type of the proto message parser associated with this RemoteDescriptor.

RemoteDescriptor.Builder!
setProtoType(protoType: Class<Any!>)

Sets the type of the proto message associated with this RemoteDescriptor.

RemoteDescriptor.Builder!
setRemoteConstrTypes(remoteConstrTypes: Array<Class<Any!>!>?)

Sets the remote constructor types of the EspressoRemoteMessage associated with this RemoteDescriptor.

RemoteDescriptor.Builder!
setRemoteType(remoteType: Class<Any!>)

Sets the type of the EspressoRemoteMessage associated with this .

Public constructors

Builder

Builder()

Public functions

build

fun build(): RemoteDescriptor!

Builds a RemoteDescriptor from the builder properties set.

setInstanceFieldDescriptors

fun setInstanceFieldDescriptors(fieldDescriptors: Array<FieldDescriptor!>?): RemoteDescriptor.Builder!

Sets the FieldDescriptors associated with this RemoteDescriptor.

The field descriptor order, must match the instanceTypes declared constructor parameter order.

Note: Any field descriptors passed to this method will be overwritten by field descriptors annotated with RemoteMsgField.

Parameters
fieldDescriptors: Array<FieldDescriptor!>?
Returns
RemoteDescriptor.Builder!

fluent builder interface

setInstanceType

fun setInstanceType(instanceType: Class<Any!>): RemoteDescriptor.Builder!

Sets the instance type for associated with this RemoteDescriptor.

The instance type represents the class that will be converted to and from a proto.

Parameters
instanceType: Class<Any!>
Returns
RemoteDescriptor.Builder!

fluent builder interface

setProtoBuilderType

fun setProtoBuilderType(protoBuilderType: Class<Any!>): RemoteDescriptor.Builder!

Sets the type of the proto message builder associated with this RemoteDescriptor.

By default the proto builder will be created by this class. Only call this method if a custom builder is required.

Parameters
protoBuilderType: Class<Any!>

the proto message builder class

Returns
RemoteDescriptor.Builder!

fluent builder interface

setProtoParser

fun setProtoParser(protoParser: Parser<Any!>): RemoteDescriptor.Builder!

Sets the type of the proto message parser associated with this RemoteDescriptor.

By default the proto parser is inferred from the protoType. Only call this method if a custom parser is required.

Parameters
protoParser: Parser<Any!>

the proto parser

Returns
RemoteDescriptor.Builder!

fluent builder interface

setProtoType

fun setProtoType(protoType: Class<Any!>): RemoteDescriptor.Builder!

Sets the type of the proto message associated with this RemoteDescriptor.

Parameters
protoType: Class<Any!>

the proto message class

Returns
RemoteDescriptor.Builder!

fluent builder interface

setRemoteConstrTypes

fun setRemoteConstrTypes(remoteConstrTypes: Array<Class<Any!>!>?): RemoteDescriptor.Builder!

Sets the remote constructor types of the EspressoRemoteMessage associated with this RemoteDescriptor.

The types passed to this method will be used to reflectively infer the remote message constructor.

By default the instanceType is used as remote message constructor. Only set custom remote constructor types, when the remote message constructor takes a superclass or interface, implemented by the instance type. Don't call this method when using .

Parameters
remoteConstrTypes: Array<Class<Any!>!>?
Returns
RemoteDescriptor.Builder!

fluent builder interface

setRemoteType

fun setRemoteType(remoteType: Class<Any!>): RemoteDescriptor.Builder!

Sets the type of the EspressoRemoteMessage associated with this .

Parameters
remoteType: Class<Any!>

the remote message class

Returns
RemoteDescriptor.Builder!

fluent builder interface