public final class

RemoteDescriptorRegistry

extends Object
java.lang.Object
   ↳ androidx.test.espresso.remote.RemoteDescriptorRegistry

Class Overview

A registry for registering remote descriptors. Remote descriptors are registered in the form of a RemoteDescriptor object.

Summary

Public Methods
RemoteDescriptor argForInstanceType(Class<?> targetType)
RemoteDescriptor argForMsgType(Class<?> protoMsgType)
RemoteDescriptor argForRemoteTypeUrl(String typeUrl)
Returns an RemoteDescriptor by its any type url.
static RemoteDescriptorRegistry getInstance()
Returns a RemoteDescriptorRegistry object
boolean hasArgForInstanceType(Class<?> instanceType)
Checks if an instance type is registered with this registry.
boolean registerRemoteTypeArgs(List<RemoteDescriptor> remoteDescriptors)
void unregisterRemoteTypeArgs(List<RemoteDescriptor> remoteDescriptors)
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public RemoteDescriptor argForInstanceType (Class<?> targetType)

Parameters
targetType Class
Returns
RemoteDescriptor an RemoteDescriptor object by its target type.

public RemoteDescriptor argForMsgType (Class<?> protoMsgType)

Parameters
protoMsgType Class
Returns
RemoteDescriptor an RemoteDescriptor object by its proto message type.

public RemoteDescriptor argForRemoteTypeUrl (String typeUrl)

Returns an RemoteDescriptor by its any type url. The any type url in this case must match the remote type class, which knows how to convert a class to and from its target type!

Parameters
typeUrl String
Returns
RemoteDescriptor an RemoteDescriptor object by its remote type url.

public static RemoteDescriptorRegistry getInstance ()

Returns a RemoteDescriptorRegistry object

Returns
RemoteDescriptorRegistry an instance of RemoteDescriptorRegistry object.

public boolean hasArgForInstanceType (Class<?> instanceType)

Checks if an instance type is registered with this registry.

Parameters
instanceType Class: the instance to check
Returns
boolean true if a RemoteDescriptor is registered for instance type

public boolean registerRemoteTypeArgs (List<RemoteDescriptor> remoteDescriptors)

Parameters
remoteDescriptors List
Returns
boolean

public void unregisterRemoteTypeArgs (List<RemoteDescriptor> remoteDescriptors)

Parameters
remoteDescriptors List