public static InvocationHandler getInvocationHandler(Object instance) {
    try {
      Field field = instance.getClass().getDeclaredField(FIELD_NAME_HANDLER);
      field.setAccessible(true);
      return (InvocationHandler) field.get(instance);
    } catch (NoSuchFieldException e) {
      throw new IllegalArgumentException("Not a valid proxy instance", e);
    } catch (IllegalAccessException e) {
      // Should not be thrown, we just set the field to accessible.
      throw new AssertionError(e);
    }
  }
Returns the proxy's {@link InvocationHandler}.

@throws IllegalArgumentException if the object supplied is not a proxy created by this class.
android/android_framework/dex-maker/src/main/java/com/android/dx/stock/ProxyBuilder.java