java.lang.Object
io.inverno.tool.buildtools.ModuleInfo
Describes a module-info descriptor as specified in the Java language specification.
Multiple ModuleInfo
instances can be specified on the ModularizeDependenciesTask
to override or extend module-info.java
descriptors generated when modularizing project's
dependencies.
- Since:
- 1.4
- Author:
- Jeremy Kuhn
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Represents an exports directive in a module descriptor.static class
Represents an import declaration in a module descriptor.static class
Represents an opens directive in a module descriptor.static class
Represents a provides directive in a module descriptor.static class
Represents a requires directive in a module descriptor.static class
Represents a uses directive in a module descriptor. -
Field Summary
Modifier and TypeFieldDescriptionprotected List
<ModuleInfo.ExportsDirective> Module's exports directives.protected List
<ModuleInfo.ImportDeclaration> Module's import declarations.protected String
The module nameprotected boolean
Flag indicating whether the module should be declared as opened.protected List
<ModuleInfo.OpensDirective> Module's opens directives.protected List
<ModuleInfo.ProvidesDirective> Module's provides directives.protected List
<ModuleInfo.RequiresDirective> Module's requires directives.protected List
<ModuleInfo.UsesDirective> Module's uses directives. -
Constructor Summary
ConstructorDescriptionCreates a blank module info.ModuleInfo
(String name, boolean open, List<ModuleInfo.ImportDeclaration> imports, List<ModuleInfo.RequiresDirective> requires, List<ModuleInfo.ExportsDirective> exports, List<ModuleInfo.OpensDirective> opens, List<ModuleInfo.UsesDirective> uses, List<ModuleInfo.ProvidesDirective> provides) Creates a module info. -
Method Summary
Modifier and TypeMethodDescriptionReturns module's exports directives.Returns module's import declarations.getName()
Returns the name of the module.getOpens()
Returns module's opens directives.Returns module's provides directives.Returns module's requires directives.getUses()
Returns module's uses directives.boolean
isOpen()
Determines whether the module is opened.void
setOpen
(boolean open) Sets whether the module is opened.toString()
-
Field Details
-
name
The module name -
open
protected boolean openFlag indicating whether the module should be declared as opened. -
imports
Module's import declarations. -
requires
Module's requires directives. -
exports
Module's exports directives. -
opens
Module's opens directives. -
uses
Module's uses directives. -
provides
Module's provides directives.
-
-
Constructor Details
-
ModuleInfo
public ModuleInfo()Creates a blank module info.
-
ModuleInfo
public ModuleInfo(String name, boolean open, List<ModuleInfo.ImportDeclaration> imports, List<ModuleInfo.RequiresDirective> requires, List<ModuleInfo.ExportsDirective> exports, List<ModuleInfo.OpensDirective> opens, List<ModuleInfo.UsesDirective> uses, List<ModuleInfo.ProvidesDirective> provides) Creates a module info.
- Parameters:
name
- the module's nameopen
- true to open the module, false otherwiseimports
- the list of import declarationsrequires
- the list of requires directivesexports
- the list of exports directivesopens
- the list of opens directivesuses
- the list of uses directivesprovides
- the list of provides directives
-
-
Method Details
-
getName
Returns the name of the module.
- Returns:
- the module's name
-
isOpen
public boolean isOpen()Determines whether the module is opened.
- Returns:
- true if the module is opened, false otherwise
-
setOpen
public void setOpen(boolean open) Sets whether the module is opened.
- Parameters:
open
- true to open the module, false otherwise
-
getImports
Returns module's import declarations.
- Returns:
- the mutable list of import declarations
-
getRequires
Returns module's requires directives.
- Returns:
- the mutable list of requires directives
-
getExports
Returns module's exports directives.
- Returns:
- the mutable list of exports directives
-
getOpens
Returns module's opens directives.
- Returns:
- the mutable list of opens directives
-
getUses
Returns module's uses directives.
- Returns:
- the mutable list of uses directives
-
getProvides
Returns module's provides directives.
- Returns:
- the mutable list of provides directives
-
toString
-