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
Nested ClassesModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
Constructors -
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.booleanisOpen()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 voidHandles 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 voidValidates required properties.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Builder
build, get, identity, update
-
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
-
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
-
addExports
-
putExports
-
addExport
-
uses
-
addUses
-
addUse
-
addUse
Used service loader providers.- Parameters:
consumer- list of used provider interfaces- Returns:
- updated builder instance
- See Also:
-
provides
-
addProvides
-
addProvide
-
addProvides
-
putProvide
-
opens
-
addOpens
-
addOpen
-
addOpens
-
putOpen
-
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
-
uses
-
provides
-
opens
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-