code: public static Object callMethod(final Method method, final Object instance, final Object... parameters) throws CoreException {
  
          Object res = null;
  
          try {
              // store current visibility
              final boolean accessible = method.isAccessible();
  
              // let it accessible anyway
              method.setAccessible(true);
  
              // Call this method with right parameters
              res = method.invoke(instance, parameters);
  
              // Reset default visibility
              method.setAccessible(accessible);
  
          } catch (IllegalAccessException | InvocationTargetException | IllegalArgumentException e) {
              final String methodName = instance.getClass().getSimpleName() + "." + method.getName();
              throw new CoreException("Impossible to call method " + methodName, e);
          }
          return res;
      }
docs: Call the given method for the instance object even if its visibility is private or protected.
  
  @param method the method to call
  @param instance the object instance to use
  @param parameters the list of method parameters to use
  
  @return the method return
  @throws CoreException if the method call has failed