Package net.bytebuddy.dynamic
Class DynamicType.Builder.ModuleDefinition.AbstractBase<U>
- java.lang.Object
-
- net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase<U>
-
- net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase.Delegator<U>
-
- net.bytebuddy.dynamic.DynamicType.Builder.ModuleDefinition.AbstractBase<U>
-
- Type Parameters:
U- A loaded type that the built type is guaranteed to be a subclass of.
- All Implemented Interfaces:
DynamicType.Builder<U>,DynamicType.Builder.ModuleDefinition<U>
- Direct Known Subclasses:
DynamicType.Builder.AbstractBase.Adapter.ModuleDefinitionAdapter,DynamicType.Builder.ModuleDefinition.AbstractBase.Delegator
- Enclosing interface:
- DynamicType.Builder.ModuleDefinition<S>
public abstract static class DynamicType.Builder.ModuleDefinition.AbstractBase<U> extends DynamicType.Builder.AbstractBase.Delegator<U> implements DynamicType.Builder.ModuleDefinition<U>
An abstract base implementation of aDynamicType.Builder.ModuleDefinition.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDynamicType.Builder.ModuleDefinition.AbstractBase.Delegator<V>An adapter for aDynamicType.Builder.ModuleDefinition.-
Nested classes/interfaces inherited from class net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase
DynamicType.Builder.AbstractBase.Adapter<U>, DynamicType.Builder.AbstractBase.UsingTypeWriter<U>
-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.DynamicType.Builder
DynamicType.Builder.AbstractBase<S>, DynamicType.Builder.FieldDefinition<S>, DynamicType.Builder.InnerTypeDefinition<S>, DynamicType.Builder.MethodDefinition<S>, DynamicType.Builder.ModuleDefinition<S>, DynamicType.Builder.RecordComponentDefinition<S>, DynamicType.Builder.TypeVariableDefinition<S>
-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.DynamicType.Builder.ModuleDefinition
DynamicType.Builder.ModuleDefinition.AbstractBase<U>, DynamicType.Builder.ModuleDefinition.ExportsDefinition<U>, DynamicType.Builder.ModuleDefinition.OpensDefinition<S>, DynamicType.Builder.ModuleDefinition.RequiresDefinition<U>
-
-
Constructor Summary
Constructors Constructor Description AbstractBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DynamicType.Builder.ModuleDefinition<U>export(java.lang.String aPackage, java.util.Collection<? extends ModifierContributor.ForModule.OfExport> modifierContributors)Specifies a package export with additional modifiers.DynamicType.Builder.ModuleDefinition<U>export(java.lang.String aPackage, ModifierContributor.ForModule.OfExport... modifierContributor)Specifies a package export with additional modifiers.DynamicType.Builder.ModuleDefinition<U>exports(java.lang.String... aPackage)Specifies packages that are exported by the module being defined.DynamicType.Builder.ModuleDefinition<U>exports(java.util.Collection<java.lang.String> packages)Specifies packages that are exported by the module being defined.DynamicType.Builder.ModuleDefinition<U>mainClass(java.lang.Class<?> type)Specifies the main class of the module being defined.DynamicType.Builder.ModuleDefinition<U>mainClass(TypeDescription typeDescription)Specifies the main class of the module being defined.DynamicType.Builder.ModuleDefinition<U>open(java.lang.String aPackage, java.util.Collection<? extends ModifierContributor.ForModule.OfOpen> modifierContributors)Specifies a package opening with additional modifiers.DynamicType.Builder.ModuleDefinition<U>open(java.lang.String aPackage, ModifierContributor.ForModule.OfOpen... modifierContributor)Specifies a package opening with additional modifiers.DynamicType.Builder.ModuleDefinition<U>opens(java.lang.String... aPackage)Specifies packages that are opened by the module being defined.DynamicType.Builder.ModuleDefinition<U>opens(java.util.Collection<java.lang.String> packages)Specifies packages that are opened by the module being defined.DynamicType.Builder.ModuleDefinition<U>packages(java.lang.String... aPackage)Specifies the packages that are contained within the module being defined.DynamicType.Builder.ModuleDefinition<U>provides(java.lang.Class<?> service, java.lang.Class<?>... implementations)Specifies service implementations that are provided by the module being defined.DynamicType.Builder.ModuleDefinition<U>provides(java.lang.Class<?> service, java.util.Collection<java.lang.Class<?>> implementations)Specifies service implementations that are provided by the module being defined.DynamicType.Builder.ModuleDefinition<U>provides(java.lang.String service, java.lang.String... implementations)Specifies service implementations that are provided by the module being defined.DynamicType.Builder.ModuleDefinition<U>provides(TypeDescription service, java.util.Collection<TypeDescription> implementations)Specifies service implementations that are provided by the module being defined.DynamicType.Builder.ModuleDefinition<U>provides(TypeDescription service, TypeDescription... implementation)Specifies service implementations that are provided by the module being defined.DynamicType.Builder.ModuleDefinition.RequiresDefinition<U>require(java.lang.String module, java.util.Collection<? extends ModifierContributor.ForModule.OfRequire> modifierContributors)Specifies a module requirement with additional modifiers.DynamicType.Builder.ModuleDefinition.RequiresDefinition<U>require(java.lang.String module, ModifierContributor.ForModule.OfRequire... modifierContributor)Specifies a module requirement with additional modifiers.DynamicType.Builder.ModuleDefinition<U>requires(java.lang.String... module)Specifies the modules that are required by the module being defined.DynamicType.Builder.ModuleDefinition<U>requires(java.util.Collection<java.lang.String> modules)Specifies the modules that are required by the module being defined.DynamicType.Builder.ModuleDefinition<U>uses(java.lang.Class<?>... service)Specifies services that are used by the module being defined.DynamicType.Builder.ModuleDefinition<U>uses(java.lang.String... service)Specifies services that are used by the module being defined.private DynamicType.Builder.ModuleDefinition<U>uses(java.util.List<TypeDescription> services)Includes the provided type in the usage of the module description.DynamicType.Builder.ModuleDefinition<U>uses(TypeDescription... service)Specifies services that are used by the module being defined.-
Methods inherited from class net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase.Delegator
adjustModule, adjustModule, annotateType, attribute, declaredTypes, define, defineConstructor, defineField, defineMethod, defineRecordComponent, field, ignoreAlso, ignoreAlso, implement, initializer, initializer, innerTypeOf, innerTypeOf, invokable, make, make, make, make, materialize, merge, modifiers, module, name, nestHost, nestMembers, permittedSubclass, recordComponent, recordComponent, require, suffix, topLevelType, toTypeDescription, transform, typeVariable, unsealed, visit, wrap, wrap
-
Methods inherited from class net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase
annotateType, annotateType, annotateType, constructor, declaredTypes, declaredTypes, declaredTypes, define, define, define, define, define, defineConstructor, defineConstructor, defineField, defineField, defineField, defineField, defineField, defineMethod, defineMethod, defineMethod, defineMethod, defineMethod, defineProperty, defineProperty, defineProperty, defineProperty, defineRecordComponent, field, implement, implement, implement, innerTypeOf, innerTypeOf, innerTypeOf, invokable, merge, method, modifiers, modifiers, module, module, nestHost, nestMembers, nestMembers, nestMembers, noNestMate, permittedSubclass, permittedSubclass, permittedSubclass, require, require, require, serialVersionUid, typeVariable, typeVariable, typeVariable, typeVariable, withHashCodeEquals, withToString, wrap, wrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.bytebuddy.dynamic.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 Detail
-
mainClass
public DynamicType.Builder.ModuleDefinition<U> mainClass(@MaybeNull java.lang.Class<?> type)
Specifies the main class of the module being defined.- Specified by:
mainClassin interfaceDynamicType.Builder.ModuleDefinition<U>- 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
public DynamicType.Builder.ModuleDefinition<U> mainClass(@MaybeNull TypeDescription typeDescription)
Specifies the main class of the module being defined.- Specified by:
mainClassin interfaceDynamicType.Builder.ModuleDefinition<U>- 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.
-
packages
public DynamicType.Builder.ModuleDefinition<U> packages(java.lang.String... aPackage)
Specifies the packages that are contained within the module being defined.- Specified by:
packagesin interfaceDynamicType.Builder.ModuleDefinition<U>- 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.
-
requires
public DynamicType.Builder.ModuleDefinition<U> requires(java.lang.String... module)
Specifies the modules that are required by the module being defined.- Specified by:
requiresin interfaceDynamicType.Builder.ModuleDefinition<U>- 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
public DynamicType.Builder.ModuleDefinition<U> requires(java.util.Collection<java.lang.String> modules)
Specifies the modules that are required by the module being defined.- Specified by:
requiresin interfaceDynamicType.Builder.ModuleDefinition<U>- 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
public DynamicType.Builder.ModuleDefinition.RequiresDefinition<U> require(java.lang.String module, ModifierContributor.ForModule.OfRequire... modifierContributor)
Specifies a module requirement with additional modifiers.- Specified by:
requirein interfaceDynamicType.Builder.ModuleDefinition<U>- 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
public DynamicType.Builder.ModuleDefinition.RequiresDefinition<U> require(java.lang.String module, java.util.Collection<? extends ModifierContributor.ForModule.OfRequire> modifierContributors)
Specifies a module requirement with additional modifiers.- Specified by:
requirein interfaceDynamicType.Builder.ModuleDefinition<U>- 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.
-
exports
public DynamicType.Builder.ModuleDefinition<U> exports(java.lang.String... aPackage)
Specifies packages that are exported by the module being defined.- Specified by:
exportsin interfaceDynamicType.Builder.ModuleDefinition<U>- 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
public DynamicType.Builder.ModuleDefinition<U> exports(java.util.Collection<java.lang.String> packages)
Specifies packages that are exported by the module being defined.- Specified by:
exportsin interfaceDynamicType.Builder.ModuleDefinition<U>- 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
public DynamicType.Builder.ModuleDefinition<U> export(java.lang.String aPackage, ModifierContributor.ForModule.OfExport... modifierContributor)
Specifies a package export with additional modifiers.- Specified by:
exportin interfaceDynamicType.Builder.ModuleDefinition<U>- 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
public DynamicType.Builder.ModuleDefinition<U> export(java.lang.String aPackage, java.util.Collection<? extends ModifierContributor.ForModule.OfExport> modifierContributors)
Specifies a package export with additional modifiers.- Specified by:
exportin interfaceDynamicType.Builder.ModuleDefinition<U>- 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.
-
opens
public DynamicType.Builder.ModuleDefinition<U> opens(java.lang.String... aPackage)
Specifies packages that are opened by the module being defined.- Specified by:
opensin interfaceDynamicType.Builder.ModuleDefinition<U>- 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
public DynamicType.Builder.ModuleDefinition<U> opens(java.util.Collection<java.lang.String> packages)
Specifies packages that are opened by the module being defined.- Specified by:
opensin interfaceDynamicType.Builder.ModuleDefinition<U>- 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
public DynamicType.Builder.ModuleDefinition<U> open(java.lang.String aPackage, ModifierContributor.ForModule.OfOpen... modifierContributor)
Specifies a package opening with additional modifiers.- Specified by:
openin interfaceDynamicType.Builder.ModuleDefinition<U>- 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
public DynamicType.Builder.ModuleDefinition<U> open(java.lang.String aPackage, java.util.Collection<? extends ModifierContributor.ForModule.OfOpen> modifierContributors)
Specifies a package opening with additional modifiers.- Specified by:
openin interfaceDynamicType.Builder.ModuleDefinition<U>- 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.
-
uses
public DynamicType.Builder.ModuleDefinition<U> uses(java.lang.Class<?>... service)
Specifies services that are used by the module being defined.- Specified by:
usesin interfaceDynamicType.Builder.ModuleDefinition<U>- 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
public DynamicType.Builder.ModuleDefinition<U> uses(TypeDescription... service)
Specifies services that are used by the module being defined.- Specified by:
usesin interfaceDynamicType.Builder.ModuleDefinition<U>- 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
private DynamicType.Builder.ModuleDefinition<U> uses(java.util.List<TypeDescription> services)
Includes the provided type in the usage of the module description.- Parameters:
services- The services to use.- Returns:
- A module description where these services are included.
-
uses
public DynamicType.Builder.ModuleDefinition<U> uses(java.lang.String... service)
Specifies services that are used by the module being defined.- Specified by:
usesin interfaceDynamicType.Builder.ModuleDefinition<U>- 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.
-
provides
public DynamicType.Builder.ModuleDefinition<U> provides(java.lang.Class<?> service, java.lang.Class<?>... implementations)
Specifies service implementations that are provided by the module being defined.- Specified by:
providesin interfaceDynamicType.Builder.ModuleDefinition<U>- 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
public DynamicType.Builder.ModuleDefinition<U> provides(java.lang.Class<?> service, java.util.Collection<java.lang.Class<?>> implementations)
Specifies service implementations that are provided by the module being defined.- Specified by:
providesin interfaceDynamicType.Builder.ModuleDefinition<U>- 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
public DynamicType.Builder.ModuleDefinition<U> provides(TypeDescription service, TypeDescription... implementation)
Specifies service implementations that are provided by the module being defined.- Specified by:
providesin interfaceDynamicType.Builder.ModuleDefinition<U>- 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
public DynamicType.Builder.ModuleDefinition<U> provides(TypeDescription service, java.util.Collection<TypeDescription> implementations)
Specifies service implementations that are provided by the module being defined.- Specified by:
providesin interfaceDynamicType.Builder.ModuleDefinition<U>- 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
public DynamicType.Builder.ModuleDefinition<U> provides(java.lang.String service, java.lang.String... implementations)
Specifies service implementations that are provided by the module being defined.- Specified by:
providesin interfaceDynamicType.Builder.ModuleDefinition<U>- 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.
-
-