views:

48

answers:

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

+2  A: 

Method.getGenericParameterTypes is the method for you!

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

Tom Hawtin - tackline