mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 01:24:33 +02:00
8178339: javadoc includes qualified opens in "Additional Opened Packages" section
Reviewed-by: jjg
This commit is contained in:
parent
b8c3c011ae
commit
6ca7f21e55
4 changed files with 233 additions and 62 deletions
|
@ -45,6 +45,7 @@ public class ModuleBuilder {
|
|||
private String comment = "";
|
||||
private List<String> requires = new ArrayList<>();
|
||||
private List<String> exports = new ArrayList<>();
|
||||
private List<String> opens = new ArrayList<>();
|
||||
private List<String> uses = new ArrayList<>();
|
||||
private List<String> provides = new ArrayList<>();
|
||||
private List<String> content = new ArrayList<>();
|
||||
|
@ -133,33 +134,6 @@ public class ModuleBuilder {
|
|||
return addDirective(exports, "exports " + pkg + ";");
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an unqualified "exports dynamic" directive to the declaration.
|
||||
* @param pkg the name of the package to be exported
|
||||
* @return this builder
|
||||
*/
|
||||
public ModuleBuilder exportsDynamic(String pkg) {
|
||||
return addDirective(exports, "exports dynamic " + pkg + ";");
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an unqualified "exports private" directive to the declaration.
|
||||
* @param pkg the name of the package to be exported
|
||||
* @return this builder
|
||||
*/
|
||||
public ModuleBuilder exportsPrivate(String pkg) {
|
||||
return addDirective(exports, "exports private " + pkg + ";");
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an unqualified "exports dynamic private" directive to the declaration.
|
||||
* @param pkg the name of the package to be exported
|
||||
* @return this builder
|
||||
*/
|
||||
public ModuleBuilder exportsDynamicPrivate(String pkg) {
|
||||
return addDirective(exports, "exports dynamic private " + pkg + ";");
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a qualified "exports" directive to the declaration.
|
||||
* @param pkg the name of the package to be exported
|
||||
|
@ -171,33 +145,22 @@ public class ModuleBuilder {
|
|||
}
|
||||
|
||||
/**
|
||||
* Adds a qualified "exports dynamic" directive to the declaration.
|
||||
* @param pkg the name of the package to be exported
|
||||
* @param module the name of the module to which it is to be exported
|
||||
* Adds an unqualified "opens" directive to the declaration.
|
||||
* @param pkg the name of the package to be opened
|
||||
* @return this builder
|
||||
*/
|
||||
public ModuleBuilder exportsDynamicTo(String pkg, String module) {
|
||||
return addDirective(exports, "exports dynamic " + pkg + " to " + module + ";");
|
||||
public ModuleBuilder opens(String pkg) {
|
||||
return addDirective(opens, "opens " + pkg + ";");
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a qualified "exports private" directive to the declaration.
|
||||
* @param pkg the name of the package to be exported
|
||||
* @param module the name of the module to which it is to be exported
|
||||
* Adds a qualified "opens" directive to the declaration.
|
||||
* @param pkg the name of the package to be opened
|
||||
* @param module the name of the module to which it is to be opened
|
||||
* @return this builder
|
||||
*/
|
||||
public ModuleBuilder exportsPrivateTo(String pkg, String module) {
|
||||
return addDirective(exports, "exports private " + pkg + " to " + module + ";");
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a qualified "exports dynamic private" directive to the declaration.
|
||||
* @param pkg the name of the package to be exported
|
||||
* @param module the name of the module to which it is to be exported
|
||||
* @return this builder
|
||||
*/
|
||||
public ModuleBuilder exportsDynamicPrivateTo(String pkg, String module) {
|
||||
return addDirective(exports, "exports dynamic private " + pkg + " to " + module + ";");
|
||||
public ModuleBuilder opensTo(String pkg, String module) {
|
||||
return addDirective(opens, "opens " + pkg + " to " + module + ";");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -254,6 +217,7 @@ public class ModuleBuilder {
|
|||
sb.append("module ").append(name).append(" {\n");
|
||||
requires.forEach(r -> sb.append(" " + r + "\n"));
|
||||
exports.forEach(e -> sb.append(" " + e + "\n"));
|
||||
opens.forEach(o -> sb.append(" " + o + "\n"));
|
||||
uses.forEach(u -> sb.append(" " + u + "\n"));
|
||||
provides.forEach(p -> sb.append(" " + p + "\n"));
|
||||
sb.append("}");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue