diff -r 7d1a1fb5b01a -r 3d97124aebf5 tools/java/src/stx/libjava/tools/compiler/CompilerAdapter.java --- a/tools/java/src/stx/libjava/tools/compiler/CompilerAdapter.java Sun Sep 15 02:16:13 2013 +0100 +++ b/tools/java/src/stx/libjava/tools/compiler/CompilerAdapter.java Mon Sep 16 01:04:57 2013 +0100 @@ -46,6 +46,19 @@ * @return true, if compilation succeeded, false otherwise. */ public boolean compile(String source) { + return compile(source, true); + } + + /** + * Compiles classes in given source. The resulting .class files are added + * to an internal list which can be later retrieved by getClassFiles() - + * but only if @param generate is true. + * + * @param source source code of the class as String. + * @param generate if false, .class files are not generated (used to check source for errors) + * @return true, if compilation succeeded, false otherwise. + */ + public boolean compile(String source, boolean generate) { ICompilerRequestor requestor = this; IErrorHandlingPolicy policy = DefaultErrorHandlingPolicies.exitAfterAllProblems(); IProblemFactory problemFactory = new DefaultProblemFactory(Locale.getDefault());