Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » how to define variable argument methods(like String[] getValues(String... limits);)
how to define variable argument methods [message #849395] Thu, 19 April 2012 05:32 Go to next message
Ludwig Moser is currently offline Ludwig MoserFriend
Messages: 476
Registered: July 2009
Senior Member
Hello,

is it possible (if so how) to define a method with variable arguments?

i currently have this function in my code
String[] getValues(String... limits);

and i want to move this from my current code to the EMF model.
but i do not know how to achieve this.

thanks in advance
Ludwig
Re: how to define variable argument methods [message #849432 is a reply to message #849395] Thu, 19 April 2012 06:18 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Ludwig,

Sorry, no, I've not addressed
https://bugs.eclipse.org/bugs/show_bug.cgi?id=337052 yet. I'll need
some type of annotation on the EParameter or a GenParameter property for
the generator to do the right thing.


On 19/04/2012 7:32 AM, Ludwig Moser wrote:
> Hello,
>
> is it possible (if so how) to define a method with variable arguments?
>
> i currently have this function in my code
> String[] getValues(String... limits);
> and i want to move this from my current code to the EMF model.
> but i do not know how to achieve this.
>
> thanks in advance
> Ludwig


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: how to define variable argument methods [message #849439 is a reply to message #849432] Thu, 19 April 2012 06:29 Go to previous message
Ludwig Moser is currently offline Ludwig MoserFriend
Messages: 476
Registered: July 2009
Senior Member
ok, then EStringArray as arg will do the same.
thanks for your fast reply, ed!
Previous Topic:return type String[]
Next Topic:[CDO] IProgressMonitor.setCanceled(true) doesn't cancel commit
Goto Forum:
  


Current Time: Sat Apr 27 02:25:35 GMT 2024

Powered by FUDForum. Page generated in 0.03047 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top