@Override
    public JavaFileObject getJavaFileForOutput(Location location, String name, Kind kind,
            FileObject sibling) throws IOException {
        JavaFileObject javaFileObject = null;
        LocationAndKind key = new LocationAndKind(location, kind);

        if (ramFileSystem.containsKey(key)) {
            javaFileObject = ramFileSystem.get(key).get(name);
            if (javaFileObject != null) {
                return javaFileObject;
            }
        }
        if (kind == Kind.SOURCE) {
            javaFileObject = new MemSourceFileObject(name);
        } else {
            javaFileObject = new MemJavaFileObject(urlPrefix, name, kind);
        }
        register(key, javaFileObject);
        return javaFileObject;
    }
MemFileManager is a memory based implementation of the JavaFileManager
interface

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