RemoteDescriptor.Builder
public
static
final
class
RemoteDescriptor.Builder
extends Object
java.lang.Object | |
↳ | android.support.test.espresso.remote.RemoteDescriptor.Builder |
Builder for RemoteDescriptor
Summary
Public constructors | |
---|---|
RemoteDescriptor.Builder()
|
Public methods | |
---|---|
RemoteDescriptor
|
build()
Builds a |
RemoteDescriptor.Builder
|
setInstanceFieldDescriptors(FieldDescriptor... fieldDescriptors)
Sets the |
RemoteDescriptor.Builder
|
)">setInstanceType(Class<?> instanceType)
Sets the instance type for associated with this |
RemoteDescriptor.Builder
|
)">setProtoBuilderType(Class<?> protoBuilderType)
Sets the type of the proto message builder associated with this |
RemoteDescriptor.Builder
|
)">setProtoParser(Parser<?> protoParser)
Sets the type of the proto message parser associated with this |
RemoteDescriptor.Builder
|
)">setProtoType(Class<?> protoType)
Sets the type of the proto message associated with this |
RemoteDescriptor.Builder
|
...)">setRemoteConstrTypes(Class...<?> remoteConstrTypes)
Sets the remote constructor types of the |
RemoteDescriptor.Builder
|
)">setRemoteType(Class<?> remoteType)
Sets the type of the |
Inherited methods | |
---|---|
From
class
java.lang.Object
|
Public constructors
RemoteDescriptor.Builder
RemoteDescriptor.Builder ()
Public methods
build
RemoteDescriptor build ()
Builds a RemoteDescriptor
from the builder properties set.
Returns | |
---|---|
RemoteDescriptor |
setInstanceFieldDescriptors
RemoteDescriptor.Builder setInstanceFieldDescriptors (FieldDescriptor... fieldDescriptors)
Sets the FieldDescriptor
s associated with this RemoteDescriptor
.
The field descriptor order, must match the instanceType
s declared constructor
parameter order.
Note: Any field descriptors passed to this method will be overwritten by field descriptors
annotated with RemoteMsgField
.
Returns | |
---|---|
RemoteDescriptor.Builder |
fluent builder interface |
setInstanceType
RemoteDescriptor.Builder setInstanceType (Class<?> instanceType)
Sets the instance type for associated with this RemoteDescriptor
.
The instance type represents the class that will be converted to and from a proto.
Returns | |
---|---|
RemoteDescriptor.Builder |
fluent builder interface |
setProtoBuilderType
RemoteDescriptor.Builder setProtoBuilderType (Class<?> protoBuilderType)
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 : the proto message builder class |
Returns | |
---|---|
RemoteDescriptor.Builder |
fluent builder interface |
setProtoParser
RemoteDescriptor.Builder setProtoParser (Parser<?> protoParser)
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 : the proto parser |
Returns | |
---|---|
RemoteDescriptor.Builder |
fluent builder interface |
setProtoType
RemoteDescriptor.Builder setProtoType (Class<?> protoType)
Sets the type of the proto message associated with this RemoteDescriptor
.
Parameters | |
---|---|
protoType |
Class : the proto message class |
Returns | |
---|---|
RemoteDescriptor.Builder |
fluent builder interface |
setRemoteConstrTypes
RemoteDescriptor.Builder setRemoteConstrTypes (Class...<?> remoteConstrTypes)
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 GenericRemoteMessage
.
Returns | |
---|---|
RemoteDescriptor.Builder |
fluent builder interface |
setRemoteType
RemoteDescriptor.Builder setRemoteType (Class<?> remoteType)
Sets the type of the EspressoRemoteMessage
associated with this RemoteDescriptor
.
Parameters | |
---|---|
remoteType |
Class : the remote message class |
Returns | |
---|---|
RemoteDescriptor.Builder |
fluent builder interface |
Interfaces
Classes
- ConstructorInvocation
- EspressoRemote
- FieldDescriptor
- GenericRemoteMessage
- InteractionRequest
- InteractionRequest.Builder
- InteractionResponse
- InteractionResponse.Builder
- InteractionResponse.RemoteError
- NoopRemoteInteraction
- ProtoUtils
- RemoteDescriptor
- RemoteDescriptor.Builder
- RemoteDescriptorRegistry
- RemoteInteractionRegistry
- TypeProtoConverters
Enums
Exceptions