public JavaCompiler(Context context) {
        super(preRegister(context));

        context.put(compilerKey, this);
        apt = Apt.instance(context);

        ClassReader classReader = ClassReader.instance(context);
        classReader.preferSource = true;

        // TEMPORARY NOTE: bark==log, but while refactoring, we maintain their
        // original identities, to remember the original intent.
        log = Log.instance(context);
        bark = Bark.instance(context);

        Options options = Options.instance(context);
        classOutput   = options.get("-retrofit")      == null;
        nocompile     = options.get("-nocompile")     != null;
        print         = options.get("-print")         != null;
        classesAsDecls= options.get("-XclassesAsDecls") != null;

        genSourceFileNames = new java.util.LinkedHashSet<String>();
        genClassFileNames  = new java.util.LinkedHashSet<String>();

        // this forces a copy of the line map to be kept in the tree,
        // for use by com.sun.mirror.util.SourcePosition.
        lineDebugInfo = true;
    }