[Reflection] Retrouver une methode avec des parametres primitifs
Est-ce que quelqu'un pourrait m'expliquer pourquoi cet appel :
Code:
1 2
|
ResultSet.class.getMethod("getString", Integer.class); |
me lance une NoSuchMethodException alors que cet appel :
Code:
1 2
|
ResultSet.class.getMethod("getString", String.class); |
ne pose aucun probleme.
Je precise que je travaille sous Java 5, et que donc getMethod a pour signature :
Citation:
public Method getMethod(String name, Class... parameterTypes)
throws NoSuchMethodException, SecurityException