553N/A * Copyright (c) 2005, 2006, 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 0N/A * Provides interfaces for tools which can be invoked from a program, 0N/A * for example, compilers. 0N/A * <p>These interfaces and classes are required as part of the 0N/A * Java™ Platform, Standard Edition (Java SE), 0N/A * but there is no requirement to provide any tools implementing them. 0N/A * <p>Unless explicitly allowed, all methods in this package might 0N/A * throw a {@linkplain java.lang.NullPointerException} if given a 0N/A * {@code null} argument or if given a 0N/A * {@linkplain java.lang.Iterable list or collection} containing 0N/A * {@code null} elements. Similarly, no method may return 0N/A * {@code null} unless explicitly allowed. 0N/A * <p>This package is the home of the Java programming language compiler framework. This 0N/A * framework allows clients of the framework to locate and run 0N/A * compilers from programs. The framework also provides Service 0N/A * Provider Interfaces (SPI) for structured access to diagnostics 0N/A * ({@linkplain javax.tools.DiagnosticListener}) as well as a file 0N/A * abstraction for overriding file access ({@linkplain 0N/A * <p>There is no requirement for a compiler at runtime. However, if 0N/A * a default compiler is provided, it can be located using the 0N/A * {@linkplain javax.tools.ToolProvider}, for example: 0N/A * <p>{@code JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();} 0N/A * <p>It is possible to provide alternative compilers or tools 0N/A * through the {@linkplain java.util.ServiceLoader service provider 0N/A * <p>For example, if {@code com.vendor.VendorJavaCompiler} is a 0N/A * provider of the {@code JavaCompiler} tool then its jar file 0N/A * would contain the file {@code 0N/A * contain the single line: 0N/A * <p>{@code com.vendor.VendorJavaCompiler} 0N/A * <p>If the jar file is on the class path, VendorJavaCompiler can be 0N/A * located using code like this: 0N/A * <p>{@code JavaCompiler compiler = ServiceLoader.load(JavaCompiler.class).iterator().next();} 0N/A * @author Peter von der Ahé 0N/A * @author Jonathan Gibbons