Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.

CallbackReceiver

public class CallbackReceiver
extends Object

java.lang.Object
   ↳ androidx.remotecallback.compiler.CallbackReceiver


Holder class that is created for each class instance that is a CallbackReceiver and has methods tagged with @RemoteCallable.

Summary

Public constructors

CallbackReceiver(Element c, ProcessingEnvironment env, Messager messager)

Public methods

void addMethod(Element element)

Adds a method tagged with @RemoteCallable to this receiver.

void finish(ProcessingEnvironment env, Messager messager)

Generates the code to handle creating and executing callbacks.

Inherited methods

Public constructors

CallbackReceiver

public CallbackReceiver (Element c, 
                ProcessingEnvironment env, 
                Messager messager)

Parameters
c Element

env ProcessingEnvironment

messager Messager

Public methods

addMethod

public void addMethod (Element element)

Adds a method tagged with @RemoteCallable to this receiver.

Parameters
element Element

finish

public void finish (ProcessingEnvironment env, 
                Messager messager)

Generates the code to handle creating and executing callbacks. The code is assembled in one class that implements runnable that when run, registers all of the CallbackHandlers.

Parameters
env ProcessingEnvironment

messager Messager