# RemoteMsgConstructor

# RemoteMsgConstructor

Artifact:[androidx.test.espresso:espresso-core](https://developer.android.com/jetpack/androidx/releases/test-espresso)  
[View Source](https://cs.android.com/search?q=file:androidx/test/espresso/remote/annotation/RemoteMsgConstructor.java+class:androidx.test.espresso.remote.annotation.RemoteMsgConstructor)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/test/espresso/remote/annotation/RemoteMsgConstructor "View this page in Java")

<br />

```
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = [ElementType.CONSTRUCTOR])
annotation RemoteMsgConstructor
```

<br />

*** ** * ** ***

Constructors annotated with[RemoteMsgConstructor](https://developer.android.com/reference/kotlin/androidx/test/espresso/remote/annotation/RemoteMsgConstructor)are called during remote message deserialization to recreate a previously serialized instance.

This annotation is the counterpart of FieldDescriptor. Any instance fields marked as serializable using an FieldDescriptor will be injected into the annotated constructor.

Note: The annotated constructors param order must match the order defined in FieldDescriptor  

|                                                         See also                                                          |
|---------------------------------------------------------------------------------------------------------------------------|---|
| [GenericRemoteMessage](https://developer.android.com/reference/kotlin/androidx/test/espresso/remote/GenericRemoteMessage) |   |