Home
Categories
Dictionary
Download
Project Details
Changes Log
What Links Here
How To
Syntax
FAQ
License

Javadocs APIs



The location of javadocs APIs (local or accessible through http) can be specified using one of the two following properties:
  • javadoc-<api name>: defines an API whose name is api name which points to the directory or http URL defined by the value of the property
  • APIs: the path to a an APIs XML file. The associated XML file can point to javadocs APIs, but also other kinds of APIs


Note that APIs paths can either be:
  • Absolute in an external http link
  • Relative to the output wiki directory content

Built-in available Java APIs

By default the following Java APIs are always available:
  • JAVASE: The Java 8 API
  • JAVASE7: The Java 7 API
  • JAVASE8: The Java 8 API
  • JAVASE9: The Java 9 API
  • JAVASE10: The Java 10 API
  • JAVASE11: The Java 11 API
  • JAVASE12: The Java 12 API
  • JAVASE13: The Java 13 API
  • JAVASE14: The Java 14 API
  • JAVASE15: The Java 15 API
  • JAVASE16: The Java 16 API
  • JAVASE17: The Java 17 API
  • JAVASE18: The Java 18 API
  • JAVASE19: The Java 19 API
  • JAVASE20: The Java 20 API
  • JAVASE21: The Java 21 API
  • JAVAEE: The JavaEE 7 API
  • JAVAFX: The JavaFX 8 API
  • ANDROID: The latest Android API
If the "checkHTTPLinks" property is false, but the "checkLinks" property is set to true, then for the JAVASE and JAVAFX APIS, the generator will look internally in the installed JDK to check the links validity (using reflection).

Javadoc property

The "javadoc-<api name>" property defines an API whose name is api name which points to the directory or http URL defined by the value of the property. Note that a relative directory declaration will point to the wiki output directory.

APIs property

The "APIs" property specifes an XML file defining a list of APIs[1]
See APIs.xsd for the APIs Schema
. Thei file allows to specify a list of javadoc APIs links, and for each API:
  • Its URL. Note that a relative directory declaration will point to the wiki output directory
  • Its ID
  • Optionnally, the postJava10 property specifies that this is an API for a post-Java10 Javadoc. For javadoc beginning with Java 11, the module path is mandatory
  • Optionally, a list of local libraries (Jar files) which represent this API. These Jar files will be used to validate the javadoc tags for the corresponding API if the API URL is an http link and the "checkHTTPLinks" property is set to false
Note that other kinds of APIs can be specified in this file, see APIs property for more information.

Example

  <APIs>
    <javaAPIs>
      <javaAPI url="http://junit.sourceforge.net/javadoc" id="junit">
        <javaAPILibrary jarFile="../junit5.jar" />
      </javaAPI>
    </javaAPIs>
  </APIs>
In this case, if we encounter the following tag and the "checkHTTPLinks" property is false:
      <javadoc api="junit" path="org.junit.runner.result" />
The library will look in the junit5.jar Jar file to check the validity of the API link. The validity and existence of javadoc tags will only be checked if the "checkLinks" property is set to true.

The "checkHTTPLinks" will also be used to look if javadoc tags will be checked:
  • APIs which are defined locally will be checked even if the "checkHTTPLinks" property is set to false
  • "JAVASE" and "JAVAFX" JDK APIS will be checked even if the "checkHTTPLinks" property is set to false[2]
    In that case the local installation of THE JRE wil be used
  • "JAVASE7" and "JAVAEE" APIs will not be checked if the "checkHTTPLinks" property is set to false
  • Other APIs will be checked if the "checkHTTPLinks" property is set to false if their associated library locations has been specified

Unresolved APIs

If the property has no value, then the API will remain unresolved, and the generator will generate a code String rather than an hyperlink. It can be useful in various use cases:
  • To be able to use the same wiki source for different generation types (for example one with links to an internal javadoc, and another one without an internal javadoc). It avoids to have errors in HTML when trying to go to local HTML pages which would not exist
  • Using the API and the class declaration to generate the API classes, packages and methods


For example:
   javadoc-myAPI=

Examples

  javadoc-myAPI=D://the/path/to/theAPI
Points to the absolute directory D://the/path/to/theAPI

      javadoc-myAPI=theAPI
Points to the directory <wiki output directory>/theAPI

Notes

  1. ^ See APIs.xsd for the APIs Schema
  2. ^ In that case the local installation of THE JRE wil be used

See also


Categories: configuration | general

docJGenerator Copyright (c) 2016-2023 Herve Girod. All rights reserved.