void beginContext(final Context context) {
        if (compilationInProgress)
            throw new IllegalStateException("Compilation in progress");
        compilationInProgress = true;
        final JavaFileManager givenFileManager = context.get(JavaFileManager.class);
        context.put(JavaFileManager.class, (JavaFileManager)null);
        context.put(JavaFileManager.class, new Context.Factory<JavaFileManager>() {
            public JavaFileManager make() {
                if (givenFileManager != null) {
                    context.put(JavaFileManager.class, givenFileManager);
                    return givenFileManager;
                } else {
                    return new JavacFileManager(context, true, null);
                }
            }
        });
    }