--- a/langtools/src/share/classes/javax/tools/ToolProvider.java Thu Nov 15 19:54:20 2012 -0800
+++ b/langtools/src/share/classes/javax/tools/ToolProvider.java Thu Nov 15 23:07:24 2012 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -102,6 +102,19 @@
return instance().getSystemTool(JavaCompiler.class, defaultJavaCompilerName);
}
+ private static final String defaultDocumentationToolName
+ = "com.sun.tools.javadoc.api.JavadocTool";
+
+ /**
+ * Gets the Java™ programming language documentation tool provided
+ * with this platform.
+ * @return the documentation tool provided with this platform or
+ * {@code null} if no documentation tool is provided
+ */
+ public static DocumentationTool getSystemDocumentationTool() {
+ return instance().getSystemTool(DocumentationTool.class, defaultDocumentationToolName);
+ }
+
/**
* Returns the class loader for tools provided with this platform.
* This does not include user-installed tools. Use the