/** Create a new diagnostic factory. */ protected Factory(Context context) { this(JavacMessages.instance(context), "compiler"); context.put(diagnosticFactoryKey, this); final Options options = Options.instance(context); initOptions(options); options.addListener( new Runnable() { public void run() { initOptions(options); } }); }
/** Get the Factory instance for this context. */ public static Factory instance(Context context) { Factory instance = context.get(diagnosticFactoryKey); if (instance == null) instance = new Factory(context); return instance; }