@Override
    protected Class<?> findClass(String name) throws ClassNotFoundException {
        JavaFileObject jfo = memFileSystem.get(CLASS_KEY).get(name);
        if (jfo != null) {
            byte[] bytes = ((MemJavaFileObject) jfo).getByteArray();
            return defineClass(name, bytes, 0, bytes.length);
        } else {
            return super.findClass(name);
        }
    }
MemClassLoader is a mmemory based implementation of the ClassLoader interface

@author tiwe
querydsl-codegen-utils/src/main/java/com/querydsl/codegen/utils/MemClassLoader.java