Modifier and Type | Class and Description |
---|---|
private static class | |
private static class | Extern.
Stores the info for one external doc set |
Modifier and Type | Field and Description |
---|---|
private final BaseConfiguration | configuration
The global configuration information for this run. |
private boolean | linkoffline
True if we are using -linkoffline and false if -link is used instead. |
private Map | moduleItems
Map element names onto Extern Item objects. |
private Map | |
private final Resources | |
private final Utils |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
private String | adjustEndFileSeparator(String url)
If the URL or Directory path is missing end file separator, add that. |
private String | Returns: the module name to use according to actual modularity of the packagethe package name packageName, String the module name or null moduleName, String the documentation path path, boolean whether to print a diagnostic message in case of modularity mismatch showDiagnostic)Check if the external documentation format matches our internal model of the code. |
public void | checkPlatformLinks(String
path or URL to properties file containing
platform documentation URLs, or null linkPlatformProperties, Reporter the reporter)DocErrorReporter used to report errorsCheck whether links to platform documentation are configured. |
private Extern. | findElementItem(Element
Element element)Get the Extern Item object associated with this element name. |
private String | Returns: the custom URL as Stringthe platform version number version, String path pointing to a properties file linkPlatformProperties)Retrieve and return the custom URL for the platform API documentation for the given
|
private String | Returns: the URL as Stringthe platform version number version)Return the default URL for the platform API documentation for the given |
public DocLink | Returns: if external return converted link else return nullThe element . element, DocPath The relative path. relativepath, String The link to convert. filename)Convert a link to be an external link if appropriate. |
public DocLink | |
private String | |
private String | Returns: old-form HTML namethe string that needs to be converted to a valid HTML name name)Converts a name to an old-form HTML name (old-form id). |
private DocPath | Returns: the resource paththe platform version number version)Return the resource path for the package or element list for the given |
private int | Returns: the source version numberReturn the source version number used in the current execution of javadoc. |
public boolean | Returns: true if the element is externally documentedan Element. element)Determine if a element item is externally documented. |
public boolean | |
private boolean | Returns: True if docs use old-form anchorsChecks if platform docs for the specified version use old-form anchors. |
private boolean | Returns: true if it is a pre-release versionthe source version number sourceVersion)Return true if the given |
public boolean | |
public boolean | |
public boolean | Returns: true if successful, false otherwiseURL or Directory path. url, String This can be another URL for "element-list" or ordinary
file. elemlisturl, Reporter The reporter)DocErrorReporter used to report errors.Build the extern element list from given URL or the directory path, as specified with the "-linkoffline" flag. |
private boolean | |
private InputStream | |
private void | |
private void | |
private void | readElementList(InputStream
InputStream from the "element-list" file. input, String URL or the directory path to the elements. path, boolean Is path relative? relative, int The version of platform libraries the element list belongs to,
or platformVersion, boolean isOldFormDoc)0 if it does not belong to a platform libraries doc bundle.Read the file "element-list" and for each element name found, create Extern object and associate it with the element name in the map. |
private void | readElementListFromFile(String
URL or directory path to the elements. path, DocFile Path to the local "element-list" file. elemListPath)Read the "element-list" file which is available locally. |
private void | readElementListFromURL(String
Path to the elements. urlpath, URL URL or the path to the "element-list" file. elemlisturlpath)Fetch the URL and read the "element-list" file. |
private void | readPackageListFromURL(String
Path to the packages. urlpath, URL URL or the path to the "package-list" file. elemlisturlpath)Fetch the URL and read the "package-list" file. |
private URL |
configuration | back to summary |
---|---|
private final BaseConfiguration configuration The global configuration information for this run. |
linkoffline | back to summary |
---|---|
private boolean linkoffline True if we are using -linkoffline and false if -link is used instead. |
moduleItems | back to summary |
---|---|
private Map<String, Extern. Map element names onto Extern Item objects. Lazily initialized. |
packageItems | back to summary |
---|---|
private Map<String, Map<String, Extern. |
resources | back to summary |
---|---|
private final Resources resources |
utils | back to summary |
---|---|
private final Utils utils |
Extern | back to summary |
---|---|
public Extern(BaseConfiguration configuration) |
adjustEndFileSeparator | back to summary |
---|---|
private String adjustEndFileSeparator(String url) If the URL or Directory path is missing end file separator, add that. |
checkLinkCompatibility | back to summary |
---|---|
private String checkLinkCompatibility(String packageName, String moduleName, String path, boolean showDiagnostic) Check if the external documentation format matches our internal model of the code. Returns the module name to use for external reference lookup according to the actual modularity of the external package (and regardless of modularity of documentation). |
checkPlatformLinks | back to summary |
---|---|
public void checkPlatformLinks(String linkPlatformProperties, Reporter reporter) Check whether links to platform documentation are configured. If not then configure
links using the documentation URL defined in |
findElementItem | back to summary |
---|---|
private Extern. Get the Extern Item object associated with this element name.
|
getCustomPlatformDocs | back to summary |
---|---|
private String getCustomPlatformDocs(int version, String linkPlatformProperties) throws Fault Retrieve and return the custom URL for the platform API documentation for the given
|
getDefaultPlatformDocs | back to summary |
---|---|
private String getDefaultPlatformDocs(int version) Return the default URL for the platform API documentation for the given
|
getExternalLink | back to summary |
---|---|
public DocLink getExternalLink(Element element, DocPath relativepath, String filename) Convert a link to be an external link if appropriate. |
getExternalLink | back to summary |
---|---|
public DocLink getExternalLink(Element element, DocPath relativepath, String filename, String memberName) |
getLastPathComponent | back to summary |
---|---|
private String getLastPathComponent(URL u) |
getOldFormHtmlName | back to summary |
---|---|
private String getOldFormHtmlName(String name) Converts a name to an old-form HTML name (old-form id). |
getPlatformElementList | back to summary |
---|---|
private DocPath getPlatformElementList(int version) Return the resource path for the package or element list for the given
|
getSourceVersionNumber | back to summary |
---|---|
private int getSourceVersionNumber() Return the source version number used in the current execution of javadoc.
|
isExternal | back to summary |
---|---|
public boolean isExternal(Element element) Determine if a element item is externally documented.
|
isModule | back to summary |
---|---|
public boolean isModule(String elementName) Determine if a element item is a module or not.
|
isOldFormPlatformDocs | back to summary |
---|---|
private boolean isOldFormPlatformDocs(int version) Checks if platform docs for the specified version use old-form anchors.
Old-form anchors are used by Oracle docs for JDKs 8 and 9.
It can be checked on https://docs.oracle.com/javase/ True if docs use old-form anchors
|
isPrerelease | back to summary |
---|---|
private boolean isPrerelease(int sourceVersion) Return true if the given
|
isUrl | back to summary |
---|---|
public boolean isUrl(String urlCandidate) |
link | back to summary |
---|---|
public boolean link(String url, Reporter reporter) throws DocFileIOException Build the extern element list from given URL or the directory path, as specified with the "-link" flag. Flag error if the "-link" or "-linkoffline" option is already used.
|
link | back to summary |
---|---|
public boolean link(String url, String elemlisturl, Reporter reporter) throws DocFileIOException Build the extern element list from given URL or the directory path, as specified with the "-linkoffline" flag. Flag error if the "-link" or "-linkoffline" option is already used.
|
link | back to summary |
---|---|
private boolean link(String url, String elemlisturl, Reporter reporter, boolean linkoffline) throws DocFileIOException |
open | back to summary |
---|---|
private InputStream open(URL url) throws IOException Open a stream to a URL, following a limited number of redirects if necessary.
|
printModularityMismatchDiagnostic | back to summary |
---|---|
private void printModularityMismatchDiagnostic(String key, Object arg) |
readElementList | back to summary |
---|---|
private void readElementList(DocFile file, String path, boolean isOldFormDoc) throws Fault, DocFileIOException |
readElementList | back to summary |
---|---|
private void readElementList(InputStream input, String path, boolean relative, int platformVersion, boolean isOldFormDoc) throws IOException Read the file "element-list" and for each element name found, create Extern object and associate it with the element name in the map.
|
readElementListFromFile | back to summary |
---|---|
private void readElementListFromFile(String path, DocFile elemListPath) throws Fault, DocFileIOException Read the "element-list" file which is available locally.
|
readElementListFromURL | back to summary |
---|---|
private void readElementListFromURL(String urlpath, URL elemlisturlpath) throws Fault Fetch the URL and read the "element-list" file. |
readPackageListFromURL | back to summary |
---|---|
private void readPackageListFromURL(String urlpath, URL elemlisturlpath) throws Fault Fetch the URL and read the "package-list" file. |
toURL | back to summary |
---|---|
private URL toURL(String url) throws Fault
|
Modifier and Type | Field and Description |
---|---|
private static final long |
serialVersionUID | back to summary |
---|---|
private static final long serialVersionUID |
Fault | back to summary |
---|---|
pack-priv Fault(String msg, Exception cause) |
Modifier and Type | Field and Description |
---|---|
pack-priv final String | elementName
Element name, found in the "element-list" file in the |
pack-priv final DocPath | path
The URL or the directory path at which the element documentation will be available. |
pack-priv final boolean | relative
If given path is directory path then true else if it is a URL then false. |
pack-priv final boolean | useOldFormId
Indicates that docs use old-form of anchors. |
Access | Constructor and Description |
---|---|
pack-priv | Item(String
Element name found in the "element-list" file. elementName, DocPath URL or Directory path from where the "element-list"
file is picked. path, boolean True if path is URL, false if directory path. relative, boolean useOldFormId)Constructor to build a Extern Item object and map it with the element name. |
Modifier and Type | Method and Description |
---|---|
public String | toString()
Overrides java. String representation of "this" with elementname and the path. |
elementName | back to summary |
---|---|
pack-priv final String elementName Element name, found in the "element-list" file in the |
path | back to summary |
---|---|
pack-priv final DocPath path The URL or the directory path at which the element documentation will be available. |
relative | back to summary |
---|---|
pack-priv final boolean relative If given path is directory path then true else if it is a URL then false. |
useOldFormId | back to summary |
---|---|
pack-priv final boolean useOldFormId Indicates that docs use old-form of anchors. |
Item | back to summary |
---|---|
pack-priv Item(String elementName, DocPath path, boolean relative, boolean useOldFormId) Constructor to build a Extern Item object and map it with the element name. If the same element name is found in the map, then the first mapped Item object or offline location will be retained. |
toString | back to summary |
---|---|
public String toString() Overrides java. String representation of "this" with elementname and the path.
|