code: protected <T extends BaseProxy> AutoBean<T> createProxy(final Class<T> clazz,
        final SimpleProxyId<T> id, final boolean useAppendedContexts) {
      AutoBean<T> created = null;
      if (useAppendedContexts) {
        for (final AbstractRequestContext ctx : this.state.appendedContexts) {
          created = ctx.getAutoBeanFactory().create(clazz);
          if (created != null) {
            break;
          }
        }
      } else {
        created = this.getAutoBeanFactory().create(clazz);
      }
      if (created != null) {
        created.setTag(STABLE_ID, id);
        return created;
      }
      throw new IllegalArgumentException("Unknown proxy type " + clazz.getName());
    }
docs: Creates a new proxy with an assigned ID.
  
  @param clazz The proxy type
  @param id The id to be assigned to the new proxy
  @param useAppendedContexts if {@code true} use the AutoBeanFactory types associated with any
  contexts that have been passed into {@link #append(RequestContext)}. If {@code false},
  this method will only create proxy types reachable from the implemented RequestContext
  interface.
  @throws IllegalArgumentException if the requested proxy type cannot be created