Interface DynamicType.Builder.ModuleDefinition<S>

    • Method Detail

      • version

        DynamicType.Builder.ModuleDefinition<S> version​(@MaybeNull
                                                        java.lang.String 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

        DynamicType.Builder.ModuleDefinition<S> mainClass​(@MaybeNull
                                                          java.lang.Class<?> type)
        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

        DynamicType.Builder.ModuleDefinition<S> mainClass​(@MaybeNull
                                                          TypeDescription typeDescription)
        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

        DynamicType.Builder.ModuleDefinition<S> mainClass​(@MaybeNull
                                                          java.lang.String name)
        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

        DynamicType.Builder.ModuleDefinition<S> packages​(java.lang.String... aPackage)
        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

        DynamicType.Builder.ModuleDefinition<S> packages​(java.util.Collection<java.lang.String> 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

        DynamicType.Builder.ModuleDefinition<S> requires​(java.lang.String... module)
        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

        DynamicType.Builder.ModuleDefinition<S> requires​(java.util.Collection<java.lang.String> modules)
        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​(java.lang.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.
      • exports

        DynamicType.Builder.ModuleDefinition<S> exports​(java.lang.String... aPackage)
        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

        DynamicType.Builder.ModuleDefinition<S> exports​(java.util.Collection<java.lang.String> packages)
        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​(java.lang.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​(java.lang.String aPackage,
                                                       java.util.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

        DynamicType.Builder.ModuleDefinition<S> export​(java.lang.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

        DynamicType.Builder.ModuleDefinition<S> opens​(java.lang.String... aPackage)
        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

        DynamicType.Builder.ModuleDefinition<S> opens​(java.util.Collection<java.lang.String> packages)
        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​(java.lang.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​(java.lang.String aPackage,
                                                     java.util.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

        DynamicType.Builder.ModuleDefinition<S> open​(java.lang.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

        DynamicType.Builder.ModuleDefinition<S> uses​(java.lang.Class<?>... service)
        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

        DynamicType.Builder.ModuleDefinition<S> uses​(TypeDescription... service)
        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

        DynamicType.Builder.ModuleDefinition<S> uses​(java.lang.String... service)
        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

        DynamicType.Builder.ModuleDefinition<S> uses​(java.util.Collection<java.lang.String> services)
        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​(java.lang.Class<?> service,
                                                         java.lang.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​(java.lang.Class<?> service,
                                                         java.util.Collection<java.lang.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,
                                                         java.util.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

        DynamicType.Builder.ModuleDefinition<S> provides​(java.lang.String service,
                                                         java.lang.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​(java.lang.String service,
                                                         java.util.Collection<java.lang.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.