Module io.helidon.codegen
Package io.helidon.codegen
Class ModuleInfo.BuilderBase<BUILDER extends ModuleInfo.BuilderBase<BUILDER>>
java.lang.Object
io.helidon.codegen.ModuleInfo.BuilderBase<BUILDER>
- Type Parameters:
BUILDER
- type of the builder extending this abstract builder
- All Implemented Interfaces:
Builder<BUILDER,
,ModuleInfo> Supplier<ModuleInfo>
- Direct Known Subclasses:
ModuleInfo.Builder
- Enclosing interface:
ModuleInfo
public abstract static class ModuleInfo.BuilderBase<BUILDER extends ModuleInfo.BuilderBase<BUILDER>>
extends Object
implements Builder<BUILDER,ModuleInfo>
Fluent API builder base for
ModuleInfo
.-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Generated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionExports of the module.addExports
(Map<? extends String, List<String>> exports) Exports of the module.This method adds a new value to the map value, or creates a new value.This method adds a new value to the map value, or creates a new value.This method keeps existing values, then puts all new values into the map.addProvide
(TypeName key, TypeName provide) This method adds a new value to the map value, or creates a new value.addProvides
(TypeName key, List<TypeName> provides) This method adds a new value to the map value, or creates a new value.addProvides
(Map<? extends TypeName, List<TypeName>> provides) This method keeps existing values, then puts all new values into the map.addRequire
(ModuleInfoRequires require) Declared dependencies of the module.addRequires
(List<? extends ModuleInfoRequires> requires) Declared dependencies of the module.Used service loader providers.addUse
(Consumer<TypeName.Builder> consumer) Used service loader providers.Used service loader providers.exports()
Exports of the module.Exports of the module.from
(ModuleInfo prototype) Update this builder from an existing prototype instance.from
(ModuleInfo.BuilderBase<?> builder) Update this builder from an existing prototype builder instance.boolean
isOpen()
Whether this module is declared as open module.isOpen
(boolean isOpen) Whether this module is declared as open module.name()
Name of the module.Name of the module.opens()
Map of opened packages to modules (if any).This method replaces all values with the new ones.protected void
Handles providers and decorators.provides()
Map of provider interfaces to provider implementations provided by this module.This method replaces all values with the new ones.putExports
(String packageName, List<String> moduleNames) This method adds a new value to the map, or replaces it if the key already exists.This method adds a new value to the map, or replaces it if the key already exists.putProvide
(TypeName key, List<TypeName> provide) This method adds a new value to the map, or replaces it if the key already exists.requires()
Declared dependencies of the module.requires
(List<? extends ModuleInfoRequires> requires) Declared dependencies of the module.toString()
uses()
Used service loader providers.Used service loader providers.protected void
Validates required properties.
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
Update this builder from an existing prototype instance.- Parameters:
prototype
- existing prototype to update this builder from- Returns:
- updated builder instance
-
from
Update this builder from an existing prototype builder instance.- Parameters:
builder
- existing builder prototype to update this builder from- Returns:
- updated builder instance
-
name
Name of the module.- Parameters:
name
- module name- Returns:
- updated builder instance
- See Also:
-
isOpen
Whether this module is declared as open module.- Parameters:
isOpen
- whether this module is open- Returns:
- updated builder instance
- See Also:
-
requires
Declared dependencies of the module.- Parameters:
requires
- list of requires- Returns:
- updated builder instance
- See Also:
-
addRequires
Declared dependencies of the module.- Parameters:
requires
- list of requires- Returns:
- updated builder instance
- See Also:
-
addRequire
Declared dependencies of the module.- Parameters:
require
- list of requires- Returns:
- updated builder instance
- See Also:
-
exports
Exports of the module.- Parameters:
exports
- list of exported packages- Returns:
- updated builder instance
- See Also:
-
addExports
Exports of the module.- Parameters:
exports
- list of exported packages- Returns:
- updated builder instance
- See Also:
-
putExports
This method adds a new value to the map, or replaces it if the key already exists.- Parameters:
packageName
- key to add or replacemoduleNames
- new value for the key- Returns:
- updated builder instance
- See Also:
-
addExport
Exports of the module.- Parameters:
export
- package to exportto
- exported to a module- Returns:
- updated builder instance
- See Also:
-
uses
Used service loader providers.- Parameters:
uses
- list of used provider interfaces- Returns:
- updated builder instance
- See Also:
-
addUses
Used service loader providers.- Parameters:
uses
- list of used provider interfaces- Returns:
- updated builder instance
- See Also:
-
addUse
Used service loader providers.- Parameters:
use
- list of used provider interfaces- Returns:
- updated builder instance
- See Also:
-
addUse
Used service loader providers.- Parameters:
consumer
- list of used provider interfaces- Returns:
- updated builder instance
- See Also:
-
provides
This method replaces all values with the new ones.- Parameters:
provides
- map of interface to implementations- Returns:
- updated builder instance
- See Also:
-
addProvides
This method keeps existing values, then puts all new values into the map.- Parameters:
provides
- map of interface to implementations- Returns:
- updated builder instance
- See Also:
-
addProvide
This method adds a new value to the map value, or creates a new value.- Parameters:
key
- key to add toprovide
- additional value for the key- Returns:
- updated builder instance
- See Also:
-
addProvides
This method adds a new value to the map value, or creates a new value.- Parameters:
key
- key to add toprovides
- additional values for the key- Returns:
- updated builder instance
- See Also:
-
putProvide
This method adds a new value to the map, or replaces it if the key already exists.- Parameters:
key
- key to add or replaceprovide
- new value for the key- Returns:
- updated builder instance
- See Also:
-
opens
This method replaces all values with the new ones.- Parameters:
opens
- map of package to modules- Returns:
- updated builder instance
- See Also:
-
addOpens
This method keeps existing values, then puts all new values into the map.- Parameters:
opens
- map of package to modules- Returns:
- updated builder instance
- See Also:
-
addOpen
This method adds a new value to the map value, or creates a new value.- Parameters:
key
- key to add toopen
- additional value for the key- Returns:
- updated builder instance
- See Also:
-
addOpens
This method adds a new value to the map value, or creates a new value.- Parameters:
key
- key to add toopens
- additional values for the key- Returns:
- updated builder instance
- See Also:
-
putOpen
This method adds a new value to the map, or replaces it if the key already exists.- Parameters:
key
- key to add or replaceopen
- new value for the key- Returns:
- updated builder instance
- See Also:
-
name
Name of the module.- Returns:
- the name
-
isOpen
public boolean isOpen()Whether this module is declared as open module.- Returns:
- the is open
-
requires
Declared dependencies of the module.- Returns:
- the requires
-
exports
Exports of the module.- Returns:
- the exports
-
uses
Used service loader providers.- Returns:
- the uses
-
provides
Map of provider interfaces to provider implementations provided by this module.- Returns:
- the provides
-
opens
Map of opened packages to modules (if any).- Returns:
- the opens
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-