Package javax.tools
See: Description
-
Interface Summary Interface Description Diagnostic<S> Interface for diagnostics from tools.DiagnosticListener<S> Interface for receiving diagnostics from tools.FileObject File abstraction for tools.JavaCompiler Interface to invoke Java™ programming language compilers from programs.JavaCompiler.CompilationTask Interface representing a future for a compilation task.JavaFileManager File manager for tools operating on Java™ programming language source and class files.JavaFileManager.Location Interface for locations of file objects.JavaFileObject File abstraction for tools operating on Java™ programming language source and class files.OptionChecker Interface for recognizing options.StandardJavaFileManager File manager based on java.io.File.Tool Common interface for tools that can be invoked from a program. -
Class Summary Class Description DiagnosticCollector<S> Provides an easy way to collect diagnostics in a list.ForwardingFileObject<F extends FileObject> Forwards calls to a given file object.ForwardingJavaFileManager<M extends JavaFileManager> Forwards calls to a given file manager.ForwardingJavaFileObject<F extends JavaFileObject> Forwards calls to a given file object.SimpleJavaFileObject Provides simple implementations for most methods in JavaFileObject.ToolProvider Provides methods for locating tool providers, for example, providers of compilers. -
Enum Summary Enum Description Diagnostic.Kind Kinds of diagnostics, for example, error or warning.JavaFileObject.Kind Kinds of JavaFileObjects.StandardLocation Standard locations of file objects.
Package javax.tools Description
These interfaces and classes are required as part of the Java™ Platform, Standard Edition (Java SE), but there is no requirement to provide any tools implementing them.
Unless explicitly allowed, all methods in this package might
throw a NullPointerException if given a
null
argument or if given a
list or collection containing
null
elements. Similarly, no method may return
null
unless explicitly allowed.
This package is the home of the Java programming language compiler framework. This framework allows clients of the framework to locate and run compilers from programs. The framework also provides Service Provider Interfaces (SPI) for structured access to diagnostics (DiagnosticListener) as well as a file abstraction for overriding file access (JavaFileManager and JavaFileObject). See JavaCompiler for more details on using the SPI.
There is no requirement for a compiler at runtime. However, if a default compiler is provided, it can be located using the ToolProvider, for example:
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
It is possible to provide alternative compilers or tools through the service provider mechanism.
For example, if com.vendor.VendorJavaCompiler
is a
provider of the JavaCompiler
tool then its jar file
would contain the file META-INF/services/javax.tools.JavaCompiler
. This file would
contain the single line:
com.vendor.VendorJavaCompiler
If the jar file is on the class path, VendorJavaCompiler can be located using code like this:
JavaCompiler compiler = ServiceLoader.load(JavaCompiler.class).iterator().next();
- Since:
- 1.6
Traduction non disponible
Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Version en cache
22/12/2024 04:05:07 Cette version de la page est en cache (à la date du 22/12/2024 04:05:07) afin d'accélérer le traitement. Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la dernère version de la page.Document créé le 11/06/2005, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-javax/tools/package-summary.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.