if (!Modifier.isPublic(modifiers)) {
method.setAccessible(true);
}
return new MethodInvoker() {
public Object invoke(Object target, Object... parameters)
throws IllegalAccessException, InvocationTargetException {
return method.invoke(target, parameters);
}
};