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>

public static interface DynamicType.Builder.ModuleDefinition<S> extends DynamicType.Builder<S>
A specification of a Java module.
  • Method Details

    • version

      Specifies the version of the module being defined.
      Parameters:
      version - The version of the module or null if 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 or null if 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 or null if 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 or null if 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

      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

      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

      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

      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

      DynamicType.Builder.ModuleDefinition<S> export(String aPackage, int modifiers)
      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

      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

      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

      DynamicType.Builder.ModuleDefinition<S> open(String aPackage, int modifiers)
      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

      DynamicType.Builder.ModuleDefinition<S> provides(Class<?> service, Class<?>... implementation)
      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

      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

      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

      DynamicType.Builder.ModuleDefinition<S> provides(String service, String... implementation)
      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.