Parameter Name |
Description |
Input Parameters (set with the macro call) |
"source-java" |
Defines a shortcut for the request properties 'source-class' and 'java-source'.
If this parameter is present inside the request parameters list, the system
will effectively behave as if 'source-class' and 'java-source' where set
separately. |
"java-source" |
Is the expected input parameter that points to the class or interface to scan.
The class can be specified as file (with .java as extension) or as fully qualified class name.
Valid examples:
- your.package.YourJavaClass
- your/package/YourJavaClass.java
- src/main/java/your/package/YourJavaClass.java
If only a package name or package file path is given, the extension loads the package information
instead. When this feature is used most output parameters will be empty.
Valid examples:
- your.package
- your.package
- your/package
- src/main/java/your/package
|
"apidocs" |
Optional input parameter specifying the standard path to the apidocs to use when linking via
{@link} or {@linkplain}.
Defaults to "./apidocs/", package specific, alternate link paths can be specified using
"apidocs-my.package=http://some-host/apidocs/". |
"overwrite" |
Optional boolean input parameter specifying whether the extension overwrites other input parameters.
If not set (=default) nothing is overwritten except "$class". |
Output Parameters (set by the extension) |
"name" |
Is filled with the fully qualified name of the specified class. |
"simpleName" |
Is filled with the simple name of the specified class. |
"class" |
Is filled with a map containing all other output parameters that are set by this extension.
Therefore calls like $class.simpleName and $simpleName lead to exactly the same results. |
"javaClass" |
Is filled with the JavaClass instance of the specified class and allows
accessing the QDox reflection model directly. |
"select" |
Is filled with an implementation of JavaSourceLoader$Selector that may be used to access nested, super, implemented and derived classes.
Example Usage with Velocity:
#foreach($derivedClass in $class.select.derivedClasses)
"$derivedClass.name" derives from $class.name
#end
|
"comment" |
Is filled with a the JavaDoc comment of the specified class. |
"tags" |
Is filled with a the JavaDoc Doclet-Tags of the specified class.
The tags map has a format like [
"tagName": "tagValue",
...
!! Special treatment for '@param' !!
"param": [
"parameterName": "JavaDoc comment",
...
]
]
Please note that any leading "@" characters are removed from the map keys, thus "@since"
becomes $class.tags.since. |
"annotations" |
Is filled with a map of annotations that are applied to the class.
Applied annotations are pre-processed for simplified access within a velocity template by translating the QDox model into a map.
The simple name of the mapped annotation starting with "@" is used as map key and the values are maps of annotation
parameter name and value pairs. All values are serialized to string, which includes arrays & annotation hierarchies that were
set as values.
The annotation map has a format like [
"@SimpleAnnotationName": [
"parameterName": "value",
...
],
...
]
Accessing the default value of an annotation works as expected, e.g.:
Method suppresses: $class.methods.get(0).annotations.get("@SuppressWarnings").value |
"fields" |
Is filled with a selectable list of public or protected class fields.
Every list row is a map that follows the format:
[
"type": type (signature-string),
"name": simple field name,
"value": initialization expression,
"comment": JavaDoc comment,
"tags": Map<String,(String|Map<String,String>)>
"field": JavaField,
"annotations": Map<String,Map<String,String>>
] |
"fieldsMap" |
Contains the same content as "fields" presented as Map<String,Map<?,?>> (mapping "rows" by name). |
"declaredFields" |
Is filled with a selectable list of all class fields that are not static and final.
Every list row is a map that follows the format:
[
"type": type (signature-string),
"name": simple field name,
"value": initialization expression,
"comment": JavaDoc comment,
"tags": Map<String,(String|Map<String,String>)>
"field": JavaField,
"annotations": Map<String,Map<String,String>>
] |
"declaredFieldsMap" |
Contains the same content as "declaredFields" presented as Map<String,Map<?,?>> (mapping "rows" by name). |
"constants" |
Is filled with a selectable list of public or protected class constants (static final fields).
Every list row is a map that follows the format:
[
"type": type (signature-string),
"name": simple field name,
"value": initialization expression,
"comment": JavaDoc comment,
"tags": Map<String,(String|Map<String,String>)>
"field": JavaField,
"annotations": Map<String,Map<String,String>>
] |
"constantsMap" |
Contains the same content as "constants" presented as Map<String,Map<?,?>> (mapping "rows" by name). |
"declaredConstants" |
Is filled with a selectable list of all class constants (static final fields).
Every list row is a map that follows the format:
[
"type": type (signature-string),
"name": simple field name,
"value": initialization expression,
"comment": JavaDoc comment,
"tags": Map<String,(String|Map<String,String>)>
"field": JavaField,
"annotations": Map<String,Map<String,String>>
] |
"declaredConstantsMap" |
Contains the same content as "declaredConstants" presented as Map<String,Map<?,?>> (mapping "rows" by name). |
"properties" |
Is filled with a selectable list of bean properties.
Every list row is a map that follows the format:
[
"type": property type (signature-string),
"name": simple property name (equals the name of the field),
"comment": getter or field JavaDoc comment (field comment is used when getter contains no comment),
"tags": Map<String,(String|Map<String,String>)>
"setterComment": setter JavaDoc comment,
"setterTags": Map<String,(String|Map<String,String>)>
"property": BeanProperty,
"getter": JavaMethod,
"setter": JavaMethod,
"field": JavaField,
"value": field initialization expression,
"annotations": Map<String,Map<String,String>>
]
Note: The annotations map contains a combined map of all annotations that were either specified on field, setter,
or getter (using this precedence on conflicts). |
"propertiesMap" |
Contains the same content as "properties" presented as Map<String,Map<?,?>> (mapping "rows" by name). |
"interfaceMethods" |
Is filled with a selectable list of abstract or interface methods.
Every list row is a map that follows the format:
[
"type": return type (signature-string),
"name": simple method name,
"signature": method call signature (signature-string),
"comment": JavaDoc comment,
"tags": Map<String,(String|Map<String,String>)>
"method": JavaMethod,
"annotations": Map<String,Map<String,String>>,
"parameterAnnotations": Map<String,Map<String,Map<String,String>>>
] |
"interfaceMethodsMap" |
Contains the same content as "interfaceMethods" presented as Map<String,Map<?,?>> (mapping "rows" by name). |
"methods" |
Is filled with a selectable list of public or protected methods.
Every list row is a map that follows the format:
[
"type": return type (signature-string),
"name": simple method name,
"signature": method call signature (signature-string),
"comment": JavaDoc comment,
"tags": Map<String,(String|Map<String,String>)>
"method": JavaMethod,
"annotations": Map<String,Map<String,String>>,
"parameterAnnotations": Map<String,Map<String,Map<String,String>>>
] |
"methodsMap" |
Contains the same content as "methods" presented as Map<String,Map<?,?>> (mapping "rows" by name). |
Note: Output parameters are set when this extension is used and can be accessed from
velocity templates using $nameOfOutputParameter |
Implementation "org.tinyjee.maven.dim.extensions.JavaSourceLoader":
ApiDoc |
Source
|