KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > tools > package-info


1 /*
2  * @(#)package-info.java 1.7 06/09/25
3  *
4  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 /**
9  * Provides interfaces for tools which can be invoked from a program,
10  * for example, compilers.
11  *
12  * <p>These interfaces and classes are required as part of the
13  * Java&trade; Platform, Standard Edition (Java SE),
14  * but there is no requirement to provide any tools implementing them.
15  *
16  * <p>Unless explicitly allowed, all methods in this package might
17  * throw a {@linkplain java.lang.NullPointerException} if given a
18  * {@code null} argument or if given a
19  * {@linkplain java.lang.Iterable list or collection} containing
20  * {@code null} elements. Similarly, no method may return
21  * {@code null} unless explicitly allowed.
22  *
23  * <p>This package is the home of the Java programming language compiler framework. This
24  * framework allows clients of the framework to locate and run
25  * compilers from programs. The framework also provides Service
26  * Provider Interfaces (SPI) for structured access to diagnostics
27  * ({@linkplain javax.tools.DiagnosticListener}) as well as a file
28  * abstraction for overriding file access ({@linkplain
29  * javax.tools.JavaFileManager} and {@linkplain
30  * javax.tools.JavaFileObject}). See {@linkplain
31  * javax.tools.JavaCompiler} for more details on using the SPI.
32  *
33  * <p>There is no requirement for a compiler at runtime. However, if
34  * a default compiler is provided, it can be located using the
35  * {@linkplain javax.tools.ToolProvider}, for example:
36  *
37  * <p>{@code JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();}
38  *
39  * <p>It is possible to provide alternative compilers or tools
40  * through the {@linkplain java.util.ServiceLoader service provider
41  * mechanism}.
42  *
43  * <p>For example, if {@code com.vendor.VendorJavaCompiler} is a
44  * provider of the {@code JavaCompiler} tool then its jar file
45  * would contain the file {@code
46  * META-INF/services/javax.tools.JavaCompiler}. This file would
47  * contain the single line:
48  *
49  * <p>{@code com.vendor.VendorJavaCompiler}
50  *
51  * <p>If the jar file is on the class path, VendorJavaCompiler can be
52  * located using code like this:
53  *
54  * <p>{@code JavaCompiler compiler = ServiceLoader.load(JavaCompiler.class).iterator().next();}
55  *
56  * @author Peter von der Ah&eacute;
57  * @author Jonathan Gibbons
58  * @since 1.6
59  */

60 package javax.tools;
61
Popular Tags