code: @SuppressWarnings("unchecked")
      protected <A> A createProxy(Class<A> cl, Expression<?> path) {
          Enhancer enhancer = new Enhancer();
          enhancer.setClassLoader(AliasFactory.class.getClassLoader());
          if (cl.isInterface()) {
              enhancer.setInterfaces(new Class<?>[] {cl, ManagedObject.class});
          } else {
              enhancer.setSuperclass(cl);
              enhancer.setInterfaces(new Class<?>[] {ManagedObject.class});
          }
          // creates one handler per proxy
          MethodInterceptor handler = new PropertyAccessInvocationHandler(path, this, pathFactory, typeSystem);
          enhancer.setCallback(handler);
          return (A) enhancer.create();
      }
docs: Create a proxy instance for the given class and path
  
  @param <A>
  @param cl type of the proxy
  @param path underlying expression
  @return proxy instance