This post is related to issue JBREFLECT-53.
As result of implementing JBREFLECT-53, I noticed that MutableClassInfo now has two
similar getDeclaredMethod methods:
| MutableMethodInfo getDeclaredMethod(String name, TypeInfo... parameters);
| MutableMethodInfo getDeclaredMethod(String name, String... parameters)
|
Now, if I try to call getDeclaredMethod with one parameter like the piece of code below:
MutableClassInfo mci = ....
| mci.getDeclaredMethod("bar");
I get the error:
The method getDeclaredMethod(String, TypeInfo[]) is ambiguous for the type
MutableClassInfo
So, this forces us to use getDeclaredMethod with a minimum of two parameters, taking away
some of the advantage of having a signature with vargars:
mci.getDeclaredMethod("bar", new TypeInfo[0]);
Would it be all right if I added a third method to MutableClassInfo (see below), so I can
get rid of the problem?
MutableMethodInfo getDeclaredMethod(String name)
My main concern is whether there could be other classes outside of JBoss Reflection
project implementing MutableClassInfo interface.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4252133#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...