The @Export annotation should permit to specify in which classes it should Export the method. For instance, commonly some methods are intended to be used only in an activity, but the class itself can be used in many different classes (Fragments, ViewModels), for instance:
@Export
@RunWith("onActivityResult")
public void facebookLoginOnActivityResult(int requestCode, int resultCode, Intent data) {
if (callbackManager != null) {
callbackManager.onActivityResult(requestCode, resultCode, data);
}
}
Currently, if you inject a class which has this into another class (ie: a ViewModel), it will try to export the "facebookLoginOnActivityResult" method there (even if it is not used). This causes unnecessary grow of the generated code.
The @Export annotation should permit to specify in which classes it should Export the method. For instance, commonly some methods are intended to be used only in an activity, but the class itself can be used in many different classes (Fragments, ViewModels), for instance:
Currently, if you inject a class which has this into another class (ie: a ViewModel), it will try to export the "facebookLoginOnActivityResult" method there (even if it is not used). This causes unnecessary grow of the generated code.
It would be good to have something like:
So, it will export the method only for the given classes or its subclasses.