groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Søren Berg Glasius (GR8Conf EU)" <sbglas...@gr8conf.org>
Subject Re: aliasing methods
Date Wed, 13 Apr 2016 08:07:58 GMT
Hi,

Can you come with some specific code examples? 

Best regards,
Søren Berg Glasius
GR8Conf Europe organizing team

GR8Conf ApS
Mobile: +45 40 44 91 88, Web: www.gr8conf.eu, Skype: sbglasius 
Company Address: Buchwaldsgade 50, 5000 Odense C, Denmark
Personal Address: Hedevej 1, Gl. Rye, 8680 Ry, Denmark
--- GR8Conf - Dedicated to the Groovy Ecosystem

From: frenchy48 <bamade@in2p3.fr>
Reply: users@groovy.apache.org <users@groovy.apache.org>
Date: April 13, 2016 at 10:04:28
To: users@groovy.incubator.apache.org <users@groovy.incubator.apache.org>
Subject:  aliasing methods  

Hello all  
I have a resource file that describes alias names for method (something with  
entries like: "org.smurf.MyClass#myMethod=otherName")  

now an initialisation code will read this resource to alias "myMethod" to  
"otherName"  

there are numerous problems:  
- when doing this aliasing I do not have instances (just the class)  
- there may be methods that are overloaded  
- and methods with arguments or no argument  

code such as:  

is not completely ok (if it is null I won't make the difference between a  
no-arg method and a method with just one arg which happens to be null)  
is there a more elegant expression to do that?  
thanks  



-----  
member of Grumpy Old Programmers  
--  
View this message in context: http://groovy.329449.n5.nabble.com/aliasing-methods-tp5732316.html
 
Sent from the Groovy Users mailing list archive at Nabble.com.  

Mime
View raw message