Class ModuleInfo.Builder
- All Implemented Interfaces:
Builder<ModuleInfo.Builder, ModuleInfo>, Supplier<ModuleInfo>
- Enclosing interface:
ModuleInfo
public static class ModuleInfo.Builder
extends ModuleInfo.BuilderBase<ModuleInfo.Builder>
implements Builder<ModuleInfo.Builder, ModuleInfo>
Fluent API builder for
ModuleInfo.-
Nested Class Summary
Nested classes/interfaces inherited from class ModuleInfo.BuilderBase
ModuleInfo.BuilderBase.ModuleInfoImplModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Method Summary
Methods inherited from class ModuleInfo.BuilderBase
addExport, addExports, addOpen, addOpens, addOpens, addProvide, addProvides, addProvides, addRequire, addRequires, addUse, addUse, addUses, exports, exports, from, from, isOpen, isOpen, name, name, opens, opens, preBuildPrototype, provides, provides, putExports, putOpen, putProvide, requires, requires, toString, uses, uses, validatePrototypeModifier 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
get, identity, updateModifier and TypeMethodDescriptiondefault ModuleInfoget()default ModuleInfo.Builderidentity()Instance of this builder as the correct type.default ModuleInfo.Builderupdate(Consumer<ModuleInfo.Builder> consumer) Update the builder in a fluent API way.
-
Method Details
-
build
Description copied from interface:BuilderBuild the instance from this builder.- Specified by:
buildin interfaceBuilder<ModuleInfo.Builder, ModuleInfo>- Returns:
- instance of the built type
-