Class JavaModuleDescriptor.Builder
java.lang.Object
org.codehaus.plexus.languages.java.jpms.JavaModuleDescriptor.Builder
- Enclosing class:
JavaModuleDescriptor
A JavaModuleDescriptor Builder
- Since:
- 1.0.0
- Author:
- Robert Scholte
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds and returns a ModuleDescriptor from its components.Adds an exported package.Adds an exported package.Adds a dependence on a module with an empty set of modifiers.requires
(Set<JavaModuleDescriptor.JavaRequires.JavaModifier> modifiers, String name) Adds a dependence on a module with the given (and possibly empty) set of modifiers.Adds a service dependence.
-
Method Details
-
requires
public JavaModuleDescriptor.Builder requires(Set<JavaModuleDescriptor.JavaRequires.JavaModifier> modifiers, String name) Adds a dependence on a module with the given (and possibly empty) set of modifiers.- Parameters:
modifiers
- The set of modifiersname
- The module name- Returns:
- This builder
-
requires
Adds a dependence on a module with an empty set of modifiers.- Parameters:
name
- The module name- Returns:
- This builder
-
exports
Adds an exported package. The package is exported to all modules.- Parameters:
source
- The package name- Returns:
- This builder
-
exports
Adds an exported package. The package is exported to a set of target modules.- Parameters:
source
- The package nametargets
- The set of target modules names- Returns:
- This builder
-
uses
Adds a service dependence.- Parameters:
service
- The service type- Returns:
- This Builder
-
provides
-
build
Builds and returns a ModuleDescriptor from its components.- Returns:
- The module descriptor
-