Skip to content

SiteUtil.getPropertiesJavadocs does not reflect all the constituents of what it does #17378

@SteLeo1602

Description

@SteLeo1602

Besides just of properties, in SiteUtil, getPropertiesJavadocs also gets the DetailNode of entire javadoc of module.

We could correspondingly rename that method and change its javadoc description. Furthermore, splitting that method into two could be considered.

/**
* Get the javadocs of the properties of the module. If the property is not present in the
* module, then the javadoc of the property from the superclass(es) is used.
*
* @param properties the properties of the module.
* @param moduleName the name of the module.
* @param modulePath the module file path.
* @return the javadocs of the properties of the module.
* @throws MacroExecutionException if an error occurs during processing.
*/
public static Map<String, DetailNode> getPropertiesJavadocs(Set<String> properties,
String moduleName, Path modulePath)
throws MacroExecutionException {
// lazy initialization
if (SUPER_CLASS_PROPERTIES_JAVADOCS.isEmpty()) {
processSuperclasses();
}
processModule(moduleName, modulePath);
final Map<String, DetailNode> unmodifiableJavadocs =
ClassAndPropertiesSettersJavadocScraper.getJavadocsForModuleOrProperty();
final Map<String, DetailNode> javadocs = new LinkedHashMap<>(unmodifiableJavadocs);
properties.forEach(property -> {
final DetailNode superClassPropertyJavadoc =
SUPER_CLASS_PROPERTIES_JAVADOCS.get(property);
if (superClassPropertyJavadoc != null) {
javadocs.putIfAbsent(property, superClassPropertyJavadoc);
}
});
assertAllPropertySetterJavadocsAreFound(properties, moduleName, javadocs);
return javadocs;
}

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions