code: public Object invoke(final MethodInvocation invocation) throws Throwable {
          String methodName = invocation.getMethod().getName();
  
          if (!shouldWrapMethodCall(methodName)) {
              return invocation.proceed();
          }
          else {
              ServiceWrapper wrapper = methodMap.get(methodName);
  
              return wrapper.invoke(new Callable<Object>() {
                      public Object call() throws Exception {
                          try {
                              return invocation.proceed();
                          } catch (Throwable e) {
                              if (e instanceof Exception)
                                  throw (Exception) e;
                              else if (e instanceof Error)
                                  throw (Error) e;
                              else
                                  throw new RuntimeException(e);
                          }
                      }
                  });
          }
      }
docs: See if the given method invocation is one that needs to be
  called through a {@link ServiceWrapper}, and if so, do so.
  @param invocation the {@link MethodInvocation} in question
  @return whatever the underlying method call would normally
  return
  @throws Throwable that the method call would generate, or
  that the {@link ServiceWrapper} would generate when tripped.