public final class Docs extends Object
| Modifier and Type | Field and Description |
|---|---|
static Comparator<com.sun.javadoc.Doc> |
DOCS_BY_NAME_COMPARATOR
Compares
Docs by their name. |
static Comparator<com.sun.javadoc.Type> |
TYPE_COMPARATOR
Compares two
Types. |
| Modifier and Type | Method and Description |
|---|---|
static com.sun.javadoc.ClassDoc |
classNamed(com.sun.javadoc.RootDoc rootDoc,
String className)
A drop-in replacement for
RootDoc.classNamed(String), but instead of returning null it prints an
error and throws a Longjump. |
static com.sun.javadoc.ClassDoc |
classScope(com.sun.javadoc.Doc doc) |
static com.sun.javadoc.Doc |
findDoc(com.sun.javadoc.Doc from,
String to,
com.sun.javadoc.RootDoc rootDoc) |
static boolean |
isSubclassOf(com.sun.javadoc.ClassDoc a,
com.sun.javadoc.ClassDoc b) |
static com.sun.javadoc.MethodDoc[] |
methods(com.sun.javadoc.ClassDoc classDoc,
boolean filter,
boolean includeInherited)
An enhanced version of
ClassDoc.methods(boolean) which optionally also includes inherited
methods. |
static com.sun.javadoc.PackageDoc |
packageScope(com.sun.javadoc.Doc doc) |
static void |
readExternalJavadocs(URL targetUrl,
URL packageListUrl,
Map<String,URL> externalJavadocs,
com.sun.javadoc.RootDoc rootDoc)
Reads package names from "packageListUrl/package-list" and puts them into the
externalJavadocs map.
|
static com.sun.javadoc.ClassDoc[] |
withSuperclasses(com.sun.javadoc.ClassDoc clasS) |
static com.sun.javadoc.ClassDoc[] |
withSuperclassesAndInterfaces(com.sun.javadoc.ClassDoc clasS) |
public static final Comparator<com.sun.javadoc.Type> TYPE_COMPARATOR
Types.public static final Comparator<com.sun.javadoc.Doc> DOCS_BY_NAME_COMPARATOR
Docs by their name.@Nullable
public static com.sun.javadoc.Doc findDoc(com.sun.javadoc.Doc from,
String to,
com.sun.javadoc.RootDoc rootDoc)
throws Longjump
from - The 'reference' for to, e.g. the MethodDoc if this is a method doc commentto - E.g. "pkg.MyClass" or "MyClass#meth" or "MyClass#meth(String)"Doc specified by to, relative to from, or null iff a doc
cannot be foundLongjumppublic static com.sun.javadoc.ClassDoc[] withSuperclasses(com.sun.javadoc.ClassDoc clasS)
Object) it extendspublic static com.sun.javadoc.ClassDoc[] withSuperclassesAndInterfaces(com.sun.javadoc.ClassDoc clasS)
Object) it extends, and all interfaces that it
and its superclasses implement@Nullable public static com.sun.javadoc.ClassDoc classScope(com.sun.javadoc.Doc doc)
ClassDoc containing the given doc, or null iff doc is a
PackageDoc or a RootDoc@Nullable public static com.sun.javadoc.PackageDoc packageScope(com.sun.javadoc.Doc doc)
PackageDoc containing the given doc, or null iff doc is a
RootDocpublic static com.sun.javadoc.MethodDoc[] methods(com.sun.javadoc.ClassDoc classDoc,
boolean filter,
boolean includeInherited)
ClassDoc.methods(boolean) which optionally also includes inherited
methods.filter - Specify true to filter according to the specified access modifier option; see
ClassDoc.methods(boolean)includeInherited - Whether to add the superclasses' and the implemented interfaces' methods after the
class's methodspublic static com.sun.javadoc.ClassDoc classNamed(com.sun.javadoc.RootDoc rootDoc,
String className)
throws Longjump
RootDoc.classNamed(String), but instead of returning null it prints an
error and throws a Longjump.Longjumppublic static boolean isSubclassOf(com.sun.javadoc.ClassDoc a,
com.sun.javadoc.ClassDoc b)
public static void readExternalJavadocs(URL targetUrl, URL packageListUrl, Map<String,URL> externalJavadocs, com.sun.javadoc.RootDoc rootDoc) throws IOException
targetUrl - Designates the root folder of the external API documentation; must end in "/"packageListUrl - Designates the folder where the "package-list" file exists; must end in "/"IOExceptionCopyright © 2022 Arno Unkrig. All rights reserved.