langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/BaseFileManager.java
equal
deleted
inserted
replaced
56 import com.sun.tools.javac.file.FSInfo; |
56 import com.sun.tools.javac.file.FSInfo; |
57 import com.sun.tools.javac.file.Locations; |
57 import com.sun.tools.javac.file.Locations; |
58 import com.sun.tools.javac.main.Option; |
58 import com.sun.tools.javac.main.Option; |
59 import com.sun.tools.javac.main.OptionHelper; |
59 import com.sun.tools.javac.main.OptionHelper; |
60 import com.sun.tools.javac.main.OptionHelper.GrumpyHelper; |
60 import com.sun.tools.javac.main.OptionHelper.GrumpyHelper; |
|
61 import com.sun.tools.javac.util.DefinedBy.Api; |
61 import com.sun.tools.javac.util.JCDiagnostic.SimpleDiagnosticPosition; |
62 import com.sun.tools.javac.util.JCDiagnostic.SimpleDiagnosticPosition; |
62 |
63 |
63 /** |
64 /** |
64 * Utility methods for building a filemanager. |
65 * Utility methods for building a filemanager. |
65 * There are no references here to file-system specific objects such as |
66 * There are no references here to file-system specific objects such as |
135 public boolean isDefaultBootClassPath() { |
136 public boolean isDefaultBootClassPath() { |
136 return locations.isDefaultBootClassPath(); |
137 return locations.isDefaultBootClassPath(); |
137 } |
138 } |
138 |
139 |
139 // <editor-fold defaultstate="collapsed" desc="Option handling"> |
140 // <editor-fold defaultstate="collapsed" desc="Option handling"> |
140 @Override |
141 @Override @DefinedBy(Api.COMPILER) |
141 public boolean handleOption(String current, Iterator<String> remaining) { |
142 public boolean handleOption(String current, Iterator<String> remaining) { |
142 OptionHelper helper = new GrumpyHelper(log) { |
143 OptionHelper helper = new GrumpyHelper(log) { |
143 @Override |
144 @Override |
144 public String get(Option option) { |
145 public String get(Option option) { |
145 return options.get(option.getText()); |
146 return options.get(option.getText()); |
181 } |
182 } |
182 // where |
183 // where |
183 private static final Set<Option> javacFileManagerOptions = |
184 private static final Set<Option> javacFileManagerOptions = |
184 Option.getJavacFileManagerOptions(); |
185 Option.getJavacFileManagerOptions(); |
185 |
186 |
186 @Override |
187 @Override @DefinedBy(Api.COMPILER) |
187 public int isSupportedOption(String option) { |
188 public int isSupportedOption(String option) { |
188 for (Option o : javacFileManagerOptions) { |
189 for (Option o : javacFileManagerOptions) { |
189 if (o.matches(option)) |
190 if (o.matches(option)) |
190 return o.hasArg() ? 1 : 0; |
191 return o.hasArg() ? 1 : 0; |
191 } |
192 } |