private JavaFileObject getFileObject(String n) {
        LocationAndKind key;
        String name;
        if (n.endsWith(Kind.CLASS.extension)) {
            name = n.replace('.', '/') + Kind.CLASS.extension;
            key = CLASS_KEY;
        } else if (n.endsWith(Kind.SOURCE.extension)) {
            name = n.replace('.', '/') + Kind.SOURCE.extension;
            key = SOURCE_KEY;
        } else {
            name = n;
            key = OTHER_KEY;
        }
        if (memFileSystem.containsKey(key)) {
            return memFileSystem.get(key).get(name);
        } 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