Interface DynamicType.Builder.ModuleDefinition<S>
- Type Parameters:
S- A loaded type that the built type is guaranteed to be a subclass of.
- All Superinterfaces:
DynamicType.Builder<S>
- All Known Subinterfaces:
DynamicType.Builder.ModuleDefinition.ExportsDefinition<U>, DynamicType.Builder.ModuleDefinition.OpensDefinition<S>, DynamicType.Builder.ModuleDefinition.RequiresDefinition<U>
- All Known Implementing Classes:
DynamicType.Builder.AbstractBase.Adapter.ModuleDefinitionAdapter, DynamicType.Builder.AbstractBase.Adapter.ModuleDefinitionAdapter.ExportsDefinitionAdapter, DynamicType.Builder.AbstractBase.Adapter.ModuleDefinitionAdapter.OpensDefinitionAdapter, DynamicType.Builder.AbstractBase.Adapter.ModuleDefinitionAdapter.RequiresDefinitionAdapter, DynamicType.Builder.ModuleDefinition.AbstractBase, DynamicType.Builder.ModuleDefinition.AbstractBase.Delegator, DynamicType.Builder.ModuleDefinition.ExportsDefinition.Delegator, DynamicType.Builder.ModuleDefinition.OpensDefinition.Delegator, DynamicType.Builder.ModuleDefinition.RequiresDefinition.Delegator
- Enclosing interface:
DynamicType.Builder<T>
A specification of a Java module.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classAn abstract base implementation of aDynamicType.Builder.ModuleDefinition.static interfaceA specification of a module export.static interfaceA specification of a module opening.static interfaceA specification of a module requirement.Nested classes/interfaces inherited from interface DynamicType.Builder
DynamicType.Builder.FieldDefinition<S>, DynamicType.Builder.InnerTypeDefinition<S>, DynamicType.Builder.MethodDefinition<S>, DynamicType.Builder.ModuleDefinition<S>, DynamicType.Builder.RecordComponentDefinition<S>, DynamicType.Builder.TypeVariableDefinition<S> -
Method Summary
Modifier and TypeMethodDescriptionSpecifies a package export with explicit modifiers.export(String aPackage, Collection<? extends ModifierContributor.ForModule.OfExport> modifierContributors) Specifies a package export with additional modifiers.export(String aPackage, ModifierContributor.ForModule.OfExport... modifierContributor) Specifies a package export with additional modifiers.Specifies packages that are exported by the module being defined.exports(Collection<String> packages) Specifies packages that are exported by the module being defined.Specifies the main class of the module being defined.Specifies the main class of the module being defined.mainClass(TypeDescription typeDescription) Specifies the main class of the module being defined.Specifies a package opening with explicit modifiers.open(String aPackage, Collection<? extends ModifierContributor.ForModule.OfOpen> modifierContributors) Specifies a package opening with additional modifiers.open(String aPackage, ModifierContributor.ForModule.OfOpen... modifierContributor) Specifies a package opening with additional modifiers.Specifies packages that are opened by the module being defined.opens(Collection<String> packages) Specifies packages that are opened by the module being defined.Specifies the packages that are contained within the module being defined.packages(Collection<String> packages) Specifies the packages that are contained within the module being defined.Specifies service implementations that are provided by the module being defined.provides(Class<?> service, Collection<Class<?>> implementations) Specifies service implementations that are provided by the module being defined.Specifies service implementations that are provided by the module being defined.provides(String service, Collection<String> implementations) Specifies service implementations that are provided by the module being defined.provides(TypeDescription service, Collection<TypeDescription> implementations) Specifies service implementations that are provided by the module being defined.provides(TypeDescription service, TypeDescription... implementation) Specifies service implementations that are provided by the module being defined.Specifies a module requirement with explicit modifiers.require(String module, Collection<? extends ModifierContributor.ForModule.OfRequire> modifierContributors) Specifies a module requirement with additional modifiers.require(String module, ModifierContributor.ForModule.OfRequire... modifierContributor) Specifies a module requirement with additional modifiers.Specifies the modules that are required by the module being defined.requires(Collection<String> modules) Specifies the modules that are required by the module being defined.Specifies services that are used by the module being defined.Specifies services that are used by the module being defined.uses(Collection<String> services) Specifies services that are used by the module being defined.uses(TypeDescription... service) Specifies services that are used by the module being defined.Specifies the version of the module being defined.Methods inherited from interface DynamicType.Builder
adjustModule, adjustModule, annotateType, annotateType, annotateType, annotateType, attribute, constructor, declaredTypes, declaredTypes, declaredTypes, declaredTypes, define, define, define, define, define, define, defineConstructor, defineConstructor, defineConstructor, defineField, defineField, defineField, defineField, defineField, defineField, defineMethod, defineMethod, defineMethod, defineMethod, defineMethod, defineMethod, defineProperty, defineProperty, defineProperty, defineProperty, defineRecordComponent, defineRecordComponent, field, field, ignoreAlso, ignoreAlso, implement, implement, implement, implement, initializer, initializer, innerTypeOf, innerTypeOf, innerTypeOf, innerTypeOf, innerTypeOf, invokable, invokable, make, make, make, make, merge, merge, method, modifiers, modifiers, modifiers, module, module, module, name, nestHost, nestHost, nestMembers, nestMembers, nestMembers, nestMembers, noNestMate, permittedSubclass, permittedSubclass, permittedSubclass, permittedSubclass, recordComponent, recordComponent, require, require, require, require, serialVersionUid, suffix, topLevelType, toTypeDescription, transform, typeVariable, typeVariable, typeVariable, typeVariable, typeVariable, unsealed, visit, withHashCodeEquals, withToString, wrap, wrap, wrap, wrap
-
Method Details
-
version
Specifies the version of the module being defined.- Parameters:
version- The version of the module ornullif no version is to be specified.- Returns:
- A new builder that is equal to this builder but with the given version specification.
-
mainClass
Specifies the main class of the module being defined.- Parameters:
type- The main class of the module ornullif no main class is to be specified.- Returns:
- A new builder that is equal to this builder but with the given main class specification.
-
mainClass
Specifies the main class of the module being defined.- Parameters:
typeDescription- The main class of the module ornullif no main class is to be specified.- Returns:
- A new builder that is equal to this builder but with the given main class specification.
-
mainClass
Specifies the main class of the module being defined.- Parameters:
name- The name of the main class of the module ornullif no main class is to be specified.- Returns:
- A new builder that is equal to this builder but with the given main class specification.
-
packages
Specifies the packages that are contained within the module being defined.- Parameters:
aPackage- The names of the packages contained within the module.- Returns:
- A new builder that is equal to this builder but with the given package specifications.
-
packages
Specifies the packages that are contained within the module being defined.- Parameters:
packages- The names of the packages contained within the module.- Returns:
- A new builder that is equal to this builder but with the given package specifications.
-
requires
Specifies the modules that are required by the module being defined.- Parameters:
module- The names of the modules that are required.- Returns:
- A new builder that is equal to this builder but with the given module requirements.
-
requires
Specifies the modules that are required by the module being defined.- Parameters:
modules- The names of the modules that are required.- Returns:
- A new builder that is equal to this builder but with the given module requirements.
-
require
DynamicType.Builder.ModuleDefinition.RequiresDefinition<S> require(String module, ModifierContributor.ForModule.OfRequire... modifierContributor) Specifies a module requirement with additional modifiers.- Parameters:
module- The name of the module that is required.modifierContributor- The modifiers to apply to the module requirement.- Returns:
- A builder for defining the module requirement.
-
require
DynamicType.Builder.ModuleDefinition.RequiresDefinition<S> require(String module, Collection<? extends ModifierContributor.ForModule.OfRequire> modifierContributors) Specifies a module requirement with additional modifiers.- Parameters:
module- The name of the module that is required.modifierContributors- The modifiers to apply to the module requirement.- Returns:
- A builder for defining the module requirement.
-
require
Specifies a module requirement with explicit modifiers.- Parameters:
module- The name of the module that is required.modifiers- The modifiers to apply to the module requirement.- Returns:
- A builder for defining the module requirement.
-
exports
Specifies packages that are exported by the module being defined.- Parameters:
aPackage- The names of the packages to export.- Returns:
- A new builder that is equal to this builder but with the given package exports.
-
exports
Specifies packages that are exported by the module being defined.- Parameters:
packages- The names of the packages to export.- Returns:
- A new builder that is equal to this builder but with the given package exports.
-
export
DynamicType.Builder.ModuleDefinition<S> export(String aPackage, ModifierContributor.ForModule.OfExport... modifierContributor) Specifies a package export with additional modifiers.- Parameters:
aPackage- The name of the package to export.modifierContributor- The modifiers to apply to the package export.- Returns:
- A new builder that is equal to this builder but with the given package export.
-
export
DynamicType.Builder.ModuleDefinition<S> export(String aPackage, Collection<? extends ModifierContributor.ForModule.OfExport> modifierContributors) Specifies a package export with additional modifiers.- Parameters:
aPackage- The name of the package to export.modifierContributors- The modifiers to apply to the package export.- Returns:
- A new builder that is equal to this builder but with the given package export.
-
export
Specifies a package export with explicit modifiers.- Parameters:
aPackage- The name of the package to export.modifiers- The modifiers to apply to the package export.- Returns:
- A new builder that is equal to this builder but with the given package export.
-
opens
Specifies packages that are opened by the module being defined.- Parameters:
aPackage- The names of the packages to open.- Returns:
- A new builder that is equal to this builder but with the given package openings.
-
opens
Specifies packages that are opened by the module being defined.- Parameters:
packages- The names of the packages to open.- Returns:
- A new builder that is equal to this builder but with the given package openings.
-
open
DynamicType.Builder.ModuleDefinition<S> open(String aPackage, ModifierContributor.ForModule.OfOpen... modifierContributor) Specifies a package opening with additional modifiers.- Parameters:
aPackage- The name of the package to open.modifierContributor- The modifiers to apply to the package opening.- Returns:
- A new builder that is equal to this builder but with the given package opening.
-
open
DynamicType.Builder.ModuleDefinition<S> open(String aPackage, Collection<? extends ModifierContributor.ForModule.OfOpen> modifierContributors) Specifies a package opening with additional modifiers.- Parameters:
aPackage- The name of the package to open.modifierContributors- The modifiers to apply to the package opening.- Returns:
- A new builder that is equal to this builder but with the given package opening.
-
open
Specifies a package opening with explicit modifiers.- Parameters:
aPackage- The name of the package to open.modifiers- The modifiers to apply to the package opening.- Returns:
- A new builder that is equal to this builder but with the given package opening.
-
uses
Specifies services that are used by the module being defined.- Parameters:
service- The types of the services to use.- Returns:
- A new builder that is equal to this builder but with the given service uses.
-
uses
Specifies services that are used by the module being defined.- Parameters:
service- The descriptions of the types of the services to use.- Returns:
- A new builder that is equal to this builder but with the given service uses.
-
uses
Specifies services that are used by the module being defined.- Parameters:
service- The names of the types of the services to use.- Returns:
- A new builder that is equal to this builder but with the given service uses.
-
uses
Specifies services that are used by the module being defined.- Parameters:
services- The names of the types of the services to use.- Returns:
- A new builder that is equal to this builder but with the given service uses.
-
provides
Specifies service implementations that are provided by the module being defined.- Parameters:
service- The type of the service for which implementations are provided.implementation- The types of the implementations that are provided.- Returns:
- A new builder that is equal to this builder but with the given service provision.
-
provides
DynamicType.Builder.ModuleDefinition<S> provides(Class<?> service, Collection<Class<?>> implementations) Specifies service implementations that are provided by the module being defined.- Parameters:
service- The type of the service for which implementations are provided.implementations- The types of the implementations that are provided.- Returns:
- A new builder that is equal to this builder but with the given service provision.
-
provides
DynamicType.Builder.ModuleDefinition<S> provides(TypeDescription service, TypeDescription... implementation) Specifies service implementations that are provided by the module being defined.- Parameters:
service- The description of the type of the service for which implementations are provided.implementation- The descriptions of the types of the implementations that are provided.- Returns:
- A new builder that is equal to this builder but with the given service provision.
-
provides
DynamicType.Builder.ModuleDefinition<S> provides(TypeDescription service, Collection<TypeDescription> implementations) Specifies service implementations that are provided by the module being defined.- Parameters:
service- The description of the type of the service for which implementations are provided.implementations- The descriptions of the types of the implementations that are provided.- Returns:
- A new builder that is equal to this builder but with the given service provision.
-
provides
Specifies service implementations that are provided by the module being defined.- Parameters:
service- The name of the type of the service for which implementations are provided.implementation- The names of the types of the implementations that are provided.- Returns:
- A new builder that is equal to this builder but with the given service provision.
-
provides
DynamicType.Builder.ModuleDefinition<S> provides(String service, Collection<String> implementations) Specifies service implementations that are provided by the module being defined.- Parameters:
service- The name of the type of the service for which implementations are provided.implementations- The names of the types of the implementations that are provided.- Returns:
- A new builder that is equal to this builder but with the given service provision.
-