|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.tools.doclets.internal.toolkit.util.Extern
public class Extern
Process and manage "-link" and "-linkoffline" to external packages. The options "-link" and "-linkoffline" both depend on the fact that Javadoc now generates "package-list"(lists all the packages which are getting documented) file in the current or the destination directory, while generating the documentation. This code is not part of an API. It is implementation that is subject to change. Do not use it as an API
| Nested Class Summary | |
|---|---|
private class |
Extern.Item
Stores the info for one external doc set |
| Field Summary | |
|---|---|
private Configuration |
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 java.util.Map<java.lang.String,Extern.Item> |
packageToItemMap
Map package names onto Extern Item objects. |
| Constructor Summary | |
|---|---|
Extern(Configuration configuration)
|
|
| Method Summary | |
|---|---|
private java.lang.String |
adjustEndFileSeparator(java.lang.String url)
If the URL or Directory path is missing end file separator, add that. |
private java.lang.String |
composeExternPackageList(java.lang.String urlOrDirPath,
java.lang.String pkgListUrlOrDirPath)
Adjusts the end file separator if it is missing from the URL or the directory path and depending upon the URL or file path, fetch or read the "package-list" file. |
private java.lang.String |
fetchURLComposeExternPackageList(java.lang.String urlpath,
java.lang.String pkglisturlpath)
Fetch the URL and read the "package-list" file. |
private Extern.Item |
findPackageItem(java.lang.String pkgName)
Get the Extern Item object associated with this package name. |
java.lang.String |
getExternalLink(java.lang.String pkgName,
java.lang.String relativepath,
java.lang.String link)
Convert a link to be an external link if appropriate. |
boolean |
isExternal(ProgramElementDoc doc)
Determine if a doc item is externally documented. |
boolean |
isUrl(java.lang.String urlCandidate)
|
private java.lang.String |
readFileComposeExternPackageList(java.lang.String path,
java.lang.String pkgListPath)
Read the "package-list" file which is available locally. |
private void |
readPackageList(java.io.InputStream input,
java.lang.String path,
boolean relative)
Read the file "package-list" and for each package name found, create Extern object and associate it with the package name in the map. |
boolean |
url(java.lang.String url,
java.lang.String pkglisturl,
DocErrorReporter reporter,
boolean linkoffline)
Build the extern package list from given URL or the directory path. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.util.Map<java.lang.String,Extern.Item> packageToItemMap
private final Configuration configuration
private boolean linkoffline
| Constructor Detail |
|---|
public Extern(Configuration configuration)
| Method Detail |
|---|
public boolean isExternal(ProgramElementDoc doc)
doc - A ProgramElementDoc.
public java.lang.String getExternalLink(java.lang.String pkgName,
java.lang.String relativepath,
java.lang.String link)
pkgName - The package name.relativepath - The relative path.link - The link to convert.
public boolean url(java.lang.String url,
java.lang.String pkglisturl,
DocErrorReporter reporter,
boolean linkoffline)
url - URL or Directory path.pkglisturl - This can be another URL for "package-list" or ordinary
file.reporter - The DocErrorReporter used to report errors.linkoffline - True if -linkoffline isused and false if -link is used.private Extern.Item findPackageItem(java.lang.String pkgName)
pkgname - Package name.
private java.lang.String composeExternPackageList(java.lang.String urlOrDirPath,
java.lang.String pkgListUrlOrDirPath)
urlOrDirPath - URL or the directory path.pkgListUrlOrDirPath - URL or directory path for the "package-list" file or the "package-list"
file itself.private java.lang.String adjustEndFileSeparator(java.lang.String url)
private java.lang.String fetchURLComposeExternPackageList(java.lang.String urlpath,
java.lang.String pkglisturlpath)
urlpath - Path to the packages.pkglisturlpath - URL or the path to the "package-list" file.
private java.lang.String readFileComposeExternPackageList(java.lang.String path,
java.lang.String pkgListPath)
path - URL or directory path to the packages.pkgListPath - Path to the local "package-list" file.
private void readPackageList(java.io.InputStream input,
java.lang.String path,
boolean relative)
throws java.io.IOException
input - InputStream from the "package-list" file.path - URL or the directory path to the packages.relative - Is path relative?
java.io.IOExceptionpublic boolean isUrl(java.lang.String urlCandidate)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||