private FilerImpl(Context context) {
        context.put(filerKey, this);
        opts = Options.instance(context);
        declMaker = DeclarationMaker.instance(context);
        bark = Bark.instance(context);
        comp = com.sun.tools.apt.main.JavaCompiler.instance(context);
        roundOver = false;
        this.filesCreated = comp.getAggregateGenFiles();

        // Encoding
        encoding = opts.get("-encoding");
        if (encoding == null) {
            encoding = DEFAULT_ENCODING;
        }

        wc = new HashSet<Flushable>();

        // Locations
        locations = new EnumMap<Location, File>(Location.class);
        String s = opts.get("-s");      // location for new source files
        String d = opts.get("-d");      // location for new class files
        locations.put(SOURCE_TREE, new File(s != null ? s : "."));
        locations.put(CLASS_TREE,  new File(d != null ? d : "."));
    }