public final class JavaDocLoader
extends java.lang.Object
Constructor and Description |
---|
JavaDocLoader(java.util.Collection<java.io.File> documentationRootDirectories)
Creates a new Java Doc Loader with the given directories
|
Modifier and Type | Method and Description |
---|---|
void |
addAdditionalApiUrl(java.lang.String additionalApiUrl)
Adds an additional API url we can try to use to get the javadocs for classes
|
void |
addDocumentationDirectory(java.io.File directory)
Adds a new directory to be scanned for documentation
|
ClassDocumentation |
getClassDocumentation(java.lang.Class clazz)
Returns the documentation for the given class
|
ClassDocumentation |
getClassDocumentationIfPresent(java.lang.Class clazz)
Returns the documentation for the given class if it is present, otherwise return the NULL documentation
|
ConstructorDocumentation |
getConstructorDocumentation(java.lang.reflect.Constructor constructor)
Gets the documentation for the given constructor
|
java.util.Set<java.io.File> |
getDocumentationDirectories()
Returns the directories that are scanned for documentation
|
VariableDocumentation |
getFieldDocumentation(java.lang.reflect.Field field)
Gets the documentation for the given field
|
SimpleTrie<java.lang.String,JavadocParser> |
getKnownImports()
Returns the KnownImports for the object
|
java.util.Set<java.lang.Class> |
getLoadedClasses()
Returns a set of the currently loaded classes
|
MethodDocumentation |
getMethodDocumentation(java.lang.reflect.Method method)
Gets the documentation for the given method
|
void |
preloadClass(java.lang.Class clazz)
Preload (and store permanently) the documentation for the specified class
|
void |
purgeAll()
Purges all documentation from the cache.
|
void |
purgeCache()
Purges all documentation from the cache.
|
public JavaDocLoader(@NotNull java.util.Collection<java.io.File> documentationRootDirectories)
documentationRootDirectories
- The directories where the documentation can be foundpublic void addAdditionalApiUrl(@NotNull java.lang.String additionalApiUrl)
additionalApiUrl
- The api endpoint to add@NotNull public SimpleTrie<java.lang.String,JavadocParser> getKnownImports()
public void preloadClass(@NotNull java.lang.Class clazz)
clazz
- The class@NotNull public ClassDocumentation getClassDocumentationIfPresent(@NotNull java.lang.Class clazz)
clazz
- The class to get the documentation for@NotNull public ClassDocumentation getClassDocumentation(@NotNull java.lang.Class clazz)
clazz
- The class to get the documentation for@NotNull public MethodDocumentation getMethodDocumentation(@Nullable java.lang.reflect.Method method)
method
- The method@NotNull public VariableDocumentation getFieldDocumentation(@Nullable java.lang.reflect.Field field)
field
- The field@NotNull public ConstructorDocumentation getConstructorDocumentation(@NotNull java.lang.reflect.Constructor constructor)
constructor
- The constructorpublic void addDocumentationDirectory(@NotNull java.io.File directory)
directory
- The directory to add@NotNull public java.util.Set<java.io.File> getDocumentationDirectories()
@NotNull public java.util.Set<java.lang.Class> getLoadedClasses()
public void purgeCache()
public void purgeAll()