Exemple

public GetMethod_Example() {
super();
}

public void setValue( int value ) {
this .value = value;
}

public int getValue() {
return value;
}

private int value;

public static void main(String[] args){
try {
Method method = GetMethod_Example.class.getMethod( "getValue", new Class[] { Void.class } ); //$NON-NLS-1$
GetMethod_Example obj = new GetMethod_Example();
method.invoke( obj, new Object[] { new Integer( 1 ) } );
System.out.println( obj.getValue() );
} catch (IllegalAccessException e) {
System.out.println( "Impossible d'accéder à la méthode privée 'getValue'" ); //$NON-NLS-1$
} catch (InvocationTargetException e) {
System.out.println( "Indicent lors de l'appel de la méthode" ); //$NON-NLS-1$
} catch (NoSuchMethodException e) {
System.out.println( "Pas de méthode getValue" ); //$NON-NLS-1$
}

}

Solution
Utilisez un accès direct à la méthode au lieu d'un getMethod avec le nom codé en dur de la méthode.

public GetMethod_Solution() {
super();
}

public void setValue( int value ) {
this .value = value;
}

public int getValue() {
return value;
}

private int value;

public static void main(String[] args) {
GetMethod_Solution obj = new GetMethod_Solution();
obj.setValue( 1 );
System.out.println( obj.getValue() );
}