langtools/src/share/classes/javax/tools/ToolProvider.java
changeset 14545 2e7bab0639b8
parent 8032 e1aa25ccdabb
child 22163 3651128c74eb
equal deleted inserted replaced
14544:d71d992cb905 14545:2e7bab0639b8
     1 /*
     1 /*
     2  * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   100      */
   100      */
   101     public static JavaCompiler getSystemJavaCompiler() {
   101     public static JavaCompiler getSystemJavaCompiler() {
   102         return instance().getSystemTool(JavaCompiler.class, defaultJavaCompilerName);
   102         return instance().getSystemTool(JavaCompiler.class, defaultJavaCompilerName);
   103     }
   103     }
   104 
   104 
       
   105     private static final String defaultDocumentationToolName
       
   106         = "com.sun.tools.javadoc.api.JavadocTool";
       
   107 
       
   108     /**
       
   109      * Gets the Java™ programming language documentation tool provided
       
   110      * with this platform.
       
   111      * @return the documentation tool provided with this platform or
       
   112      * {@code null} if no documentation tool is provided
       
   113      */
       
   114     public static DocumentationTool getSystemDocumentationTool() {
       
   115         return instance().getSystemTool(DocumentationTool.class, defaultDocumentationToolName);
       
   116     }
       
   117 
   105     /**
   118     /**
   106      * Returns the class loader for tools provided with this platform.
   119      * Returns the class loader for tools provided with this platform.
   107      * This does not include user-installed tools.  Use the
   120      * This does not include user-installed tools.  Use the
   108      * {@linkplain java.util.ServiceLoader service provider mechanism}
   121      * {@linkplain java.util.ServiceLoader service provider mechanism}
   109      * for locating user installed tools.
   122      * for locating user installed tools.