groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From frenchy48 <bam...@in2p3.fr>
Subject aliasing methods
Date Wed, 13 Apr 2016 08:04:23 GMT
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