# RemoteDescriptorRegistry

Summary:[Methods](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptorRegistry#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptorRegistry#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptorRegistry#)  

# RemoteDescriptorRegistry

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public

final

class
RemoteDescriptorRegistry
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object.html)`


``


`

|---|---------------------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||
| ↳ | android.support.test.espresso.remote.RemoteDescriptorRegistry |

<br />

*** ** * ** ***

A registry for registering remote descriptors. Remote descriptors are registered in the form of a[RemoteDescriptor](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptor)object.

## Summary

|                                                                                                                                                                                                                                                                                         ### Public methods                                                                                                                                                                                                                                                                                         ||
|---------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[RemoteDescriptor](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptor)                        | ` `[argForInstanceType](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptorRegistry#argForInstanceType(java.lang.Class<?>))`(`[Class](https://developer.android.com/reference/java/lang/Class.html)`<?> targetType) `                                                                                                                                                                                       |
| ` `[RemoteDescriptor](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptor)                        | ` `[argForMsgType](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptorRegistry#argForMsgType(java.lang.Class<?>))`(`[Class](https://developer.android.com/reference/java/lang/Class.html)`<?> protoMsgType) `                                                                                                                                                                                               |
| ` `[RemoteDescriptor](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptor)                        | ` `[argForRemoteTypeUrl](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptorRegistry#argForRemoteTypeUrl(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String.html)` typeUrl) ` Returns an[RemoteDescriptor](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptor)by its any type url.                                           |
| ` static `[RemoteDescriptorRegistry](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptorRegistry) | ` `[getInstance](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptorRegistry#getInstance())`() ` Returns a[RemoteDescriptorRegistry](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptorRegistry)object                                                                                                                                                           |
| ` boolean`                                                                                                                                  | ` `[hasArgForInstanceType](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptorRegistry#hasArgForInstanceType(java.lang.Class<?>))`(`[Class](https://developer.android.com/reference/java/lang/Class.html)`<?> instanceType) ` Checks if an instance type is registered with this registry.                                                                                                                  |
| ` boolean`                                                                                                                                  | ` `[registerRemoteTypeArgs](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptorRegistry#registerRemoteTypeArgs(java.util.List<android.support.test.espresso.remote.RemoteDescriptor>))`(`[List](https://developer.android.com/reference/java/util/List.html)`<`[RemoteDescriptor](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptor)`> remoteDescriptors) `     |
| ` void`                                                                                                                                     | ` `[unregisterRemoteTypeArgs](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptorRegistry#unregisterRemoteTypeArgs(java.util.List<android.support.test.espresso.remote.RemoteDescriptor>))`(`[List](https://developer.android.com/reference/java/util/List.html)`<`[RemoteDescriptor](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptor)`> remoteDescriptors) ` |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptorRegistry#)From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object.html)` ` |-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object.html)          | ` clone() `                                                                                | | ` boolean`                                                                          | ` equals(`[Object](https://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` void`                                                                             | ` finalize() `                                                                             | | ` final `[Class](https://developer.android.com/reference/java/lang/Class.html)`<?>` | ` getClass() `                                                                             | | ` int`                                                                              | ` hashCode() `                                                                             | | ` final void`                                                                       | ` notify() `                                                                               | | ` final void`                                                                       | ` notifyAll() `                                                                            | | ` `[String](https://developer.android.com/reference/java/lang/String.html)          | ` toString() `                                                                             | | ` final void`                                                                       | ` wait(long arg0, int arg1) `                                                              | | ` final void`                                                                       | ` wait(long arg0) `                                                                        | | ` final void`                                                                       | ` wait() `                                                                                 | ||

## Public methods

### argForInstanceType

```
RemoteDescriptor argForInstanceType (Class<?> targetType)
```

<br />

<br />

|          Parameters          ||
|--------------|----------------|
| `targetType` | `Class` <br /> |

|                                                                                                                                 Returns                                                                                                                                 ||
|-------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|
| [RemoteDescriptor](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptor) | an[RemoteDescriptor](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptor)object by its target type. <br /> |

### argForMsgType

```
RemoteDescriptor argForMsgType (Class<?> protoMsgType)
```

<br />

<br />

|           Parameters           ||
|----------------|----------------|
| `protoMsgType` | `Class` <br /> |

|                                                                                                                                    Returns                                                                                                                                     ||
|-------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [RemoteDescriptor](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptor) | an[RemoteDescriptor](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptor)object by its proto message type. <br /> |

### argForRemoteTypeUrl

```
RemoteDescriptor argForRemoteTypeUrl (String typeUrl)
```

Returns an[RemoteDescriptor](https://developer.android.com/reference/android/support/test/espresso/remote/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!

<br />

|         Parameters         ||
|-----------|-----------------|
| `typeUrl` | `String` <br /> |

|                                                                                                                                   Returns                                                                                                                                   ||
|-------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|
| [RemoteDescriptor](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptor) | an[RemoteDescriptor](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptor)object by its remote type url. <br /> |

### getInstance

```
RemoteDescriptorRegistry getInstance ()
```

Returns a[RemoteDescriptorRegistry](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptorRegistry)object

<br />

|                                                                                                                                             Returns                                                                                                                                              ||
|-----------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [RemoteDescriptorRegistry](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptorRegistry) | an instance of[RemoteDescriptorRegistry](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptorRegistry)object. <br /> |

### hasArgForInstanceType

```
boolean hasArgForInstanceType (Class<?> instanceType)
```

Checks if an instance type is registered with this registry.

<br />

|                      Parameters                       ||
|----------------|---------------------------------------|
| `instanceType` | `Class`: the instance to check <br /> |

|                                                                                   Returns                                                                                   ||
|-----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `boolean` | true if a[RemoteDescriptor](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptor)is registered for instance type <br /> |

### registerRemoteTypeArgs

```
boolean registerRemoteTypeArgs (List<RemoteDescriptor> remoteDescriptors)
```

<br />

<br />

|             Parameters             ||
|---------------------|---------------|
| `remoteDescriptors` | `List` <br /> |

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### unregisterRemoteTypeArgs

```
void unregisterRemoteTypeArgs (List<RemoteDescriptor> remoteDescriptors)
```

<br />

<br />

|             Parameters             ||
|---------------------|---------------|
| `remoteDescriptors` | `List` <br /> |

-

  ## Interfaces

  - [Bindable](https://developer.android.com/reference/android/support/test/espresso/remote/Bindable)
  - [Converter](https://developer.android.com/reference/android/support/test/espresso/remote/Converter)
  - [EspressoRemoteMessage](https://developer.android.com/reference/android/support/test/espresso/remote/EspressoRemoteMessage)
  - [EspressoRemoteMessage.From](https://developer.android.com/reference/android/support/test/espresso/remote/EspressoRemoteMessage.From)
  - [EspressoRemoteMessage.To](https://developer.android.com/reference/android/support/test/espresso/remote/EspressoRemoteMessage.To)
  - [RemoteInteraction](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteInteraction)
-

  ## Classes

  - [ConstructorInvocation](https://developer.android.com/reference/android/support/test/espresso/remote/ConstructorInvocation)
  - [EspressoRemote](https://developer.android.com/reference/android/support/test/espresso/remote/EspressoRemote)
  - [FieldDescriptor](https://developer.android.com/reference/android/support/test/espresso/remote/FieldDescriptor)
  - [GenericRemoteMessage](https://developer.android.com/reference/android/support/test/espresso/remote/GenericRemoteMessage)
  - [InteractionRequest](https://developer.android.com/reference/android/support/test/espresso/remote/InteractionRequest)
  - [InteractionRequest.Builder](https://developer.android.com/reference/android/support/test/espresso/remote/InteractionRequest.Builder)
  - [InteractionResponse](https://developer.android.com/reference/android/support/test/espresso/remote/InteractionResponse)
  - [InteractionResponse.Builder](https://developer.android.com/reference/android/support/test/espresso/remote/InteractionResponse.Builder)
  - [InteractionResponse.RemoteError](https://developer.android.com/reference/android/support/test/espresso/remote/InteractionResponse.RemoteError)
  - [NoopRemoteInteraction](https://developer.android.com/reference/android/support/test/espresso/remote/NoopRemoteInteraction)
  - [ProtoUtils](https://developer.android.com/reference/android/support/test/espresso/remote/ProtoUtils)
  - [RemoteDescriptor](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptor)
  - [RemoteDescriptor.Builder](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptor.Builder)
  - [RemoteDescriptorRegistry](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteDescriptorRegistry)
  - [RemoteInteractionRegistry](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteInteractionRegistry)
  - [TypeProtoConverters](https://developer.android.com/reference/android/support/test/espresso/remote/TypeProtoConverters)
-

  ## Enums

  - [InteractionResponse.Status](https://developer.android.com/reference/android/support/test/espresso/remote/InteractionResponse.Status)
-

  ## Exceptions

  - [NoRemoteEspressoInstanceException](https://developer.android.com/reference/android/support/test/espresso/remote/NoRemoteEspressoInstanceException)
  - [RemoteEspressoException](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteEspressoException)
  - [RemoteProtocolException](https://developer.android.com/reference/android/support/test/espresso/remote/RemoteProtocolException)