public static ClassProxy getClass(Object o) {
   if (o == null) return AClassProxy.classProxy(Object.class);
   if (o instanceof CachingRemoteObjectProxy) {
     return ((ObjectProxy) o).getClassProxy();
     /*
     CachingRemoteObjectProxy proxy = (CachingRemoteObjectProxy) o;
     Object factoryName = proxy.getFactoryName();
     RemoteFactory factory = registry.get(factoryName);
     return factory.getClass(o);
     */
   }
   return AClassProxy.classProxy(o.getClass());
 }
 public static ClassProxy classProxy(Object theClassOrClassProxy) {
   if (theClassOrClassProxy == null) return null;
   else if (theClassOrClassProxy instanceof ClassProxy) return (ClassProxy) theClassOrClassProxy;
   else if (theClassOrClassProxy instanceof Class)
     return AClassProxy.classProxy((Class) theClassOrClassProxy);
   else return null;
 }
 public static ClassProxy classProxy(Class c) {
   /*
   Enumeration<ClassFactory> factories = registry.elements();
   while (factories.hasMoreElements()) {
   	ClassProxy classProxy = factories.nextElement().classProxy(c);
   	if (classProxy != null)
   		return classProxy;
   }
   */
   return AClassProxy.classProxy(c);
 }
 public static ClassProxy javaClassForName(String s) throws ClassNotFoundException {
   // try {
   Class cls = Class.forName(s);
   return AClassProxy.classProxy(cls);
   /*
   } catch (Exception e) {
   	e.printStackTrace();
   	return null;
   }
   */
 }