public class JModule extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
_exports(Collection<JPackage> pkgs,
boolean addEmpty)
Adds packages to the list of Java module exports.
|
void |
_exports(JPackage pkg)
Adds a package to the list of Java module exports.
|
void |
_requires(boolean isPublic,
boolean isStatic,
String... names)
Adds all modules to the list of Java module requirements.
|
void |
_requires(String... names)
Adds all modules to the list of Java module requirements without
public and static modifiers. |
void |
_requires(String name)
Adds a module to the list of Java module requirements without
public and static modifiers. |
void |
_requires(String name,
boolean isPublic,
boolean isStatic)
Adds a module to the list of Java module requirements.
|
JFormatter |
generate(JFormatter f)
Print source code of Java Module declaration.
|
String |
name()
Gets the name of this module.
|
public String name()
public void _exports(JPackage pkg)
null or empty String.pkg - Java package to be exported.public void _exports(Collection<JPackage> pkgs, boolean addEmpty)
pkgs - Collection of packages to be added.addEmpty - Adds also packages without any classes when true.public void _requires(String name, boolean isPublic, boolean isStatic)
null or empty String.name - Name of required Java module.isPublic - Use public modifier.isStatic - Use static modifier.public void _requires(String name)
public and static modifiers.
The module name shall not be null or empty String.name - Name of required Java module.public void _requires(boolean isPublic,
boolean isStatic,
String... names)
null or empty String.names - Names of required Java module.isPublic - Use public modifier.isStatic - Use static modifier.public void _requires(String... names)
public and static modifiers.names - Names of required Java module.public JFormatter generate(JFormatter f)
f - Java code formatter.Copyright © 2019 JBoss by Red Hat. All rights reserved.