equal
deleted
inserted
replaced
106 * might be no reduction in overhead, a standard file manager must |
106 * might be no reduction in overhead, a standard file manager must |
107 * work with multiple sequential compilations making the following |
107 * work with multiple sequential compilations making the following |
108 * example a recommended coding pattern: |
108 * example a recommended coding pattern: |
109 * |
109 * |
110 * <pre> |
110 * <pre> |
111 * Files[] files1 = ... ; // input for first compilation task |
111 * File[] files1 = ... ; // input for first compilation task |
112 * Files[] files2 = ... ; // input for second compilation task |
112 * File[] files2 = ... ; // input for second compilation task |
113 * |
113 * |
114 * JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); |
114 * JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); |
115 * StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null); |
115 * StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null); |
116 * |
116 * |
117 * {@code Iterable<? extends JavaFileObject>} compilationUnits1 = |
117 * {@code Iterable<? extends JavaFileObject>} compilationUnits1 = |
163 * final {@linkplain java.util.logging.Logger Logger} logger = ...; |
163 * final {@linkplain java.util.logging.Logger Logger} logger = ...; |
164 * {@code Iterable<? extends JavaFileObject>} compilationUnits = ...; |
164 * {@code Iterable<? extends JavaFileObject>} compilationUnits = ...; |
165 * JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); |
165 * JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); |
166 * StandardJavaFileManager stdFileManager = compiler.getStandardFileManager(null, null, null); |
166 * StandardJavaFileManager stdFileManager = compiler.getStandardFileManager(null, null, null); |
167 * JavaFileManager fileManager = new ForwardingJavaFileManager(stdFileManager) { |
167 * JavaFileManager fileManager = new ForwardingJavaFileManager(stdFileManager) { |
168 * public void flush() { |
168 * public void flush() throws IOException { |
169 * logger.entering(StandardJavaFileManager.class.getName(), "flush"); |
169 * logger.entering(StandardJavaFileManager.class.getName(), "flush"); |
170 * super.flush(); |
170 * super.flush(); |
171 * logger.exiting(StandardJavaFileManager.class.getName(), "flush"); |
171 * logger.exiting(StandardJavaFileManager.class.getName(), "flush"); |
172 * } |
172 * } |
173 * }; |
173 * }; |