Esempio n. 1
0
    /** 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);
            }
          });
    }
Esempio n. 2
0
 /** 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;
 }