private TypeId<?>[] getInterfacesAsTypeIds() {
    TypeId<?>[] result = new TypeId<?>[interfaces.size()];
    int i = 0;
    for (Class<?> implemented : interfaces) {
      result[i++] = TypeId.get(implemented);
    }
    return result;
  }
Generate a proxy class. Note that new instances of this class will not automatically have an an
invocation handler, even if {@link #handler(InvocationHandler)} was called. The handler must be
set on each instance after it is created, using {@link #setInvocationHandler(Object,
InvocationHandler)}.
android/android_framework/dex-maker/src/main/java/com/android/dx/stock/ProxyBuilder.java