I have methods annotated as follows:
@Action(actionType=<..>)
public void doSomeAction() {
...
}
Now, I would like to invoke one of such annotated methods with given actionType
from another flow in another class.
In order to do this, I found the approaches as mentioned in the following SO posts:
- How to run all methods with a given annotation?
- Java seek a method with specific annotation and its annotation element
But in some cases, such methods may accept arguments as follows:
@Action(actionType='SEND_NOTIFICATION')
public void sendReport(String email) {
...
}
In this regard, I am not able to understand, how to check if the annotated method has any params and invoke such methods with required params.