[ http://issues.apache.org/jira/browse/BEEHIVE-893?page=all ]
Xibin Zeng updated BEEHIVE-893:
-------------------------------
Attachment: patch-893
Attaching the patch in a previous email failed for some reason. It's probably
better to put it here any ways.
> Change dispatchEvent method signature to use varargs
> ----------------------------------------------------
>
> Key: BEEHIVE-893
> URL: http://issues.apache.org/jira/browse/BEEHIVE-893
> Project: Beehive
> Type: Improvement
> Components: Controls
> Versions: TBD
> Environment: N/A
> Reporter: Xibin Zeng
> Priority: Minor
> Attachments: patch-893
>
> I suggest we use varargs in the
> org.apache.beehive.controls.api.events.EventDispatcher interface. This would
> make client code that use the method easier to read and easier to contrstuct.
> The fowllowing is the detail of this suggestion:
> Before:
> public Object dispatchEvent(ControlHandle target, EventRef event, Object []
> args)
> throws IllegalAccessException, IllegalArgumentException,
> InvocationTargetException;
> After
> public Object dispatchEvent(ControlHandle target, EventRef event, Object...
> args)
> throws IllegalAccessException, IllegalArgumentException,
> InvocationTargetException;
> For example, to dispatch a no-arg event, the client code that calls this
> method would be
> dispatcher.dispatchEvent(target, event);
> Rather than
> dispatcher.dispatchEvent(target, event, new Object[] {});
> Similarily, it looks nicer when you have arguments.
> Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira