private static void callOn(Modal modal, String method) { try { // try with bootstrap 2.0.4.0 signature GwtReflectionUtils.callPrivateMethod(modal, method); } catch (ReflectionException e) { // try with bootstrap 2.1.1.0 signature GwtReflectionUtils.callPrivateMethod(modal, method, new Object[] {null}); } }