1

I need to find all the methods in a class that accept a set of parameters in a specific order, some of them are generics (Collection). The example on the Sun web site only works with non generic classes:

http://java.sun.com/docs/books/tutorial/reflect/member/methodInvocation.html

cheers in advance

4

1 回答 1

2

Method.getGenericParameterTypes is the method for you!

<insert usual comment about reflection almost certainly being a bad idea here>

于 2009-07-27T14:32:36.310 回答