929N/A * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 553N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 553N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 553N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 553N/A * or visit www.oracle.com if you need additional information or have any 581N/A * Provides access to functionality specific to the JDK Java Compiler, javac. 580N/A * <p><b>This is NOT part of any supported API. 0N/A * If you write code that depends on this, you do so at your own 0N/A * risk. This code and its internal interfaces are subject to change 0N/A * or deletion without notice.</b></p> 0N/A * @author Peter von der Ahé 0N/A * @author Jonathan Gibbons 0N/A // NOTE: this value will be updated after annotation processing 0N/A // endContext will be called when all classes have been generated 0N/A // TODO: should handle the case after each phase if errors have occurred 135N/A //initialize compiler's default locale 0N/A * Construct a JavaFileObject from the given file. 0N/A * <p><b>TODO: this method is useless here</b></p> 0N/A * @param file a file 0N/A * @return a JavaFileObject from the standard file manager. 0N/A * Parse the specified files returning a list of abstract syntax trees. 0N/A * @throws java.io.IOException TODO 0N/A * @return a list of abstract syntax trees 0N/A * Translate all the abstract syntax trees to elements. 0N/A * @throws IOException TODO 0N/A * @return a list of elements corresponding to the top level 0N/A * classes in the abstract syntax trees 0N/A * Translate the given abstract syntax trees to elements. 0N/A * @param trees a list of abstract syntax trees. 0N/A * @throws java.io.IOException TODO 0N/A * @return a list of elements corresponding to the top level 0N/A * classes in the abstract syntax trees 0N/A // If there are still files which were specified to be compiled 0N/A // (i.e. in fileObjects) but which have not yet been entered, 0N/A // then we make sure they have been parsed and add them to the 0N/A // list to be entered. 0N/A parse();
// TODO would be nice to specify files needed to be parsed 0N/A * Complete all analysis. 0N/A * @throws IOException TODO 0N/A * Complete all analysis on the given classes. 0N/A * This can be used to ensure that all compile time errors are reported. 0N/A * The classes must have previously been returned from {@link #enter}. 0N/A * If null is specified, all outstanding classes will be analyzed. 0N/A * @param classes a list of class elements 0N/A // This implementation requires that we open up privileges on JavaCompiler. 0N/A // An alternative implementation would be to move this code to JavaCompiler and 0N/A * @throws IOException TODO 0N/A * Generate code corresponding to the given classes. 0N/A * The classes must have previously been returned from {@link #enter}. 0N/A * If there are classes outstanding to be analyzed, that will be done before 0N/A * any classes are generated. 0N/A * If null is specified, code will be generated for all outstanding classes. 0N/A * @param classes a list of class elements 0N/A analyze(
null);
// ensure all classes have been parsed, entered, and analyzed 0N/A // TODO: Should complete attribution if necessary 580N/A * For internal use only. This method will be 0N/A * removed without warning. 580N/A * For internal use only. This method will be 0N/A * removed without warning. 580N/A * For internal use only. This method will be 0N/A * removed without warning.