Class<?> createProxyClass(Class<?> clazz) {
		Class<?> cached = cache.get(clazz);
		if (cached != null) {
			return cached;
		}
		
		
		ProxyFactory f = new ProxyFactory();
		
		if (clazz.isInterface()) {
			f.setInterfaces(new Class[] {clazz});
		} else {
			f.setSuperclass(clazz);
		}
		
		f.setFilter(new MethodFilter() {
			public boolean isHandled(Method m) {
				return true;
			}
		});
		

		Class<?> c = f.createClass();
		cache.put(clazz, c);
		
		return c;
	}