Reputation: 1024
is it possible to give an parameter to the @RaiseEvent
annotation?
I have an observer
@Observer(value = { MyEvents.MY_EVENT }, create = false)
public void doSomething(String oldValue) {
when using the method call, i can give parameter with the raise Events.instance().raiseEvent(MyEvents.MY_EVENT, name);
. is it possible to give that parameter also with the annotation? (i just like prefer the annotation to the method call)
thx
Upvotes: 3
Views: 999
Reputation: 24499
No. The @RaiseEvent
annotation does not support parameters.
If you want to use parameters you have to programatically raise an event.
Events.instance().raiseEvent("nameOfObserver",parameters...);
Upvotes: 4