public class RuntimeJavadoc
extends java.lang.Object
therapi-runtime-javadoc-scribe annotation processor.| Modifier and Type | Method and Description |
|---|---|
static ClassJavadoc |
getJavadoc(java.lang.Class<?> clazz)
Gets the Javadoc of the given class.
|
static MethodJavadoc |
getJavadoc(java.lang.reflect.Constructor<?> method)
Gets the Javadoc of the given constructor.
|
static FieldJavadoc |
getJavadoc(java.lang.Enum<?> enumValue)
Gets the Javadoc of the given enum constant.
|
static FieldJavadoc |
getJavadoc(java.lang.reflect.Field field)
Gets the Javadoc of the given field.
|
static MethodJavadoc |
getJavadoc(java.lang.reflect.Method method)
Gets the Javadoc of the given method.
|
static ClassJavadoc |
getJavadoc(java.lang.String qualifiedClassName)
Gets the Javadoc of the given class.
|
static ClassJavadoc |
getJavadoc(java.lang.String qualifiedClassName,
java.lang.Class<?> loader)
Gets the Javadoc of the given class, using the given
Class object to load the Javadoc resource. |
static ClassJavadoc |
getJavadoc(java.lang.String qualifiedClassName,
java.lang.ClassLoader loader)
Gets the Javadoc of the given class, using the given
ClassLoader to find the Javadoc resource. |
public static ClassJavadoc getJavadoc(java.lang.Class<?> clazz)
The return value is always non-null. If no Javadoc is available, the returned object's
isEmpty() method will return true.
clazz - the class whose Javadoc you want to retrievepublic static ClassJavadoc getJavadoc(java.lang.String qualifiedClassName)
The return value is always non-null. If no Javadoc is available, the returned object's
isEmpty() method will return true.
qualifiedClassName - the fully qualified name of the class whose Javadoc you want to retrievepublic static ClassJavadoc getJavadoc(java.lang.String qualifiedClassName, java.lang.ClassLoader loader)
ClassLoader to find the Javadoc resource.
The return value is always non-null. If no Javadoc is available, the returned object's
isEmpty() method will return true.
qualifiedClassName - the fully qualified name of the class whose Javadoc you want to retrieveloader - the class loader to use to find the Javadoc resource filepublic static ClassJavadoc getJavadoc(java.lang.String qualifiedClassName, java.lang.Class<?> loader)
Class object to load the Javadoc resource.
The return value is always non-null. If no Javadoc is available, the returned object's
isEmpty() method will return true.
qualifiedClassName - the fully qualified name of the class whose Javadoc you want to retrieveloader - the class object to use to find the Javadoc resource filepublic static MethodJavadoc getJavadoc(java.lang.reflect.Method method)
The return value is always non-null. If no Javadoc is available, the returned object's
isEmpty() method will return true.
Implementation note: this method first retrieves the Javadoc of the class, and then matches the method signature
with the correct documentation. If the client code's purpose is to loop through all methods doc, prefer using
getJavadoc(Class) (or one of its overloads), and calling ClassJavadoc.getMethods() on the
returned class doc to retrieve method docs.
method - the method whose Javadoc you want to retrievepublic static MethodJavadoc getJavadoc(java.lang.reflect.Constructor<?> method)
The return value is always non-null. If no Javadoc is available, the returned object's
isEmpty() method will return true.
Implementation note: this method first retrieves the Javadoc of the class, and then matches the method signature
with the correct documentation. If the client code's purpose is to loop through all methods doc, prefer using
getJavadoc(Class) (or one of its overloads), and calling ClassJavadoc.getMethods() on the
returned class doc to retrieve method docs.
method - the constructor whose Javadoc you want to retrievepublic static FieldJavadoc getJavadoc(java.lang.reflect.Field field)
The return value is always non-null. If no Javadoc is available, the returned object's
isEmpty() method will return true.
Implementation note: this method first retrieves the Javadoc of the class, and then matches the field name
with the correct documentation. If the client code's purpose is to loop through all fields doc, prefer using
getJavadoc(Class) (or one of its overloads), and calling ClassJavadoc.getFields() on the
returned class doc to retrieve field docs.
field - the field whose Javadoc you want to retrievepublic static FieldJavadoc getJavadoc(java.lang.Enum<?> enumValue)
The return value is always non-null. If no Javadoc is available, the returned object's
isEmpty() method will return true.
Implementation note: this method first retrieves the Javadoc of the class, and then matches the enum constant's
name with the correct documentation. If the client code's purpose is to loop through all enum constants docs,
prefer using getJavadoc(Class) (or one of its overloads), and calling
ClassJavadoc.getEnumConstants() on the returned class doc to retrieve enum constant docs.
enumValue - the enum constant whose Javadoc you want to retrieve