Class DynamicType.Builder.ModuleDefinition.AbstractBase.Delegator<V>

Type Parameters:
V - A loaded type that the built type is guaranteed to be a subclass of.
All Implemented Interfaces:
DynamicType.Builder<V>, DynamicType.Builder.ModuleDefinition<V>
Direct Known Subclasses:
DynamicType.Builder.ModuleDefinition.ExportsDefinition.Delegator, DynamicType.Builder.ModuleDefinition.OpensDefinition.Delegator, DynamicType.Builder.ModuleDefinition.RequiresDefinition.Delegator
Enclosing class:
DynamicType.Builder.ModuleDefinition.AbstractBase<U>

public abstract static class DynamicType.Builder.ModuleDefinition.AbstractBase.Delegator<V> extends DynamicType.Builder.ModuleDefinition.AbstractBase<V>
  • Constructor Details

    • Delegator

      public Delegator()
  • 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:
      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:
      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.
    • require

      public DynamicType.Builder.ModuleDefinition.RequiresDefinition<V> require(String module, int modifiers)
      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.
    • export

      public DynamicType.Builder.ModuleDefinition<V> 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.
    • open

      public DynamicType.Builder.ModuleDefinition<V> 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:
      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

      public DynamicType.Builder.ModuleDefinition<V> 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.
    • materialize

      protected abstract DynamicType.Builder.ModuleDefinition<V> materialize()
      Description copied from class: DynamicType.Builder.AbstractBase.Delegator
      Creates a new builder that realizes the current state of the builder.
      Specified by:
      materialize in class DynamicType.Builder.AbstractBase.Delegator<V>
      Returns:
      A new builder that realizes the current state of the builder.