@Override
    protected URL findResource(String name) {
        URL retValue = super.findResource(name);
        if (retValue != null) {
            return retValue;
        } else {
            JavaFileObject jfo = getFileObject(name);
            if (jfo != null) {
                try {
                    return jfo.toUri().toURL();
                } catch (MalformedURLException ex) {
                    return null;
                }
            } else {
                return null;
            }
        }
    }
MemClassLoader is a mmemory based implementation of the ClassLoader interface

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