1.1 --- a/src/share/classes/com/sun/tools/javac/util/Options.java Tue Nov 08 11:51:05 2011 -0800 1.2 +++ b/src/share/classes/com/sun/tools/javac/util/Options.java Tue Nov 08 17:06:08 2011 -0800 1.3 @@ -157,6 +157,19 @@ 1.4 return values.size(); 1.5 } 1.6 1.7 + // light-weight notification mechanism 1.8 + 1.9 + private List<Runnable> listeners = List.nil(); 1.10 + 1.11 + public void addListener(Runnable listener) { 1.12 + listeners = listeners.prepend(listener); 1.13 + } 1.14 + 1.15 + public void notifyListeners() { 1.16 + for (Runnable r: listeners) 1.17 + r.run(); 1.18 + } 1.19 + 1.20 /** Check for a lint suboption. */ 1.21 public boolean lint(String s) { 1.22 // return true if either the specific option is enabled, or