APIdia Launch Partner
Top Description Methods
java.lang.classfile.attribute

public sealed Interface ModuleProvideInfo

permits UnboundModuleProvideInfo
Known Direct Implementers
jdk.internal.classfile.impl.UnboundAttribute.UnboundModuleProvideInfo
Imports
java.lang.classfile.constantpool.ClassEntry, java.lang.constant.ClassDesc, java.lang.module.ModuleDescriptor, java.util.Arrays, .List, jdk.internal.classfile.impl.TemporaryConstantPool, .UnboundAttribute, .Util

Models a single "provides" declaration in the ModuleAttribute.
Since
24
Java Virtual Machine Specification
4.7.25 The Module Attribute
See Also
ModuleAttribute#provides(), ModuleDescriptor.Provides

Method Summary

Modifier and TypeMethod and Description
public static ModuleProvideInfo

Returns:

a service provision description
of
(ClassEntry
the service class interface
provides
,
List<ClassEntry>
the service class implementations, must not be empty
providesWith
)

Returns a service provision description.

public static ModuleProvideInfo

Returns:

a service provision description
of
(ClassEntry
the service class interface
provides
,
ClassEntry...
the service class implementations, must not be empty
providesWith
)

Returns a service provision description.

public static ModuleProvideInfo

Returns:

a service provision description
of
(ClassDesc
the service class interface
provides
,
List<ClassDesc>
the service class implementations, must not be empty
providesWith
)

Returns a service provision description.

public static ModuleProvideInfo

Returns:

a service provision description
of
(ClassDesc
the service class interface
provides
,
ClassDesc...
the service class implementations, must not be empty
providesWith
)

Returns a service provision description.

public ClassEntry

Returns:

the service interface representing the provided service
provides
()

Returns the service interface representing the provided service.

public List<ClassEntry>

Returns:

the classes providing the service implementation
providesWith
()

Returns the classes providing the service implementation.

Method Detail

ofback to summary
public static ModuleProvideInfo of(ClassEntry provides, List<ClassEntry> providesWith)

Returns a service provision description.

Parameters
provides:ClassEntry

the service class interface

providesWith:List<ClassEntry>

the service class implementations, must not be empty

Returns:ModuleProvideInfo

a service provision description

Exceptions
IllegalArgumentException:
if the number of implementations exceeds the limit of u2
ofback to summary
public static ModuleProvideInfo of(ClassEntry provides, ClassEntry... providesWith)

Returns a service provision description.

Parameters
provides:ClassEntry

the service class interface

providesWith:ClassEntry[]

the service class implementations, must not be empty

Returns:ModuleProvideInfo

a service provision description

Exceptions
IllegalArgumentException:
if the number of implementations exceeds the limit of u2
ofback to summary
public static ModuleProvideInfo of(ClassDesc provides, List<ClassDesc> providesWith)

Returns a service provision description.

Parameters
provides:ClassDesc

the service class interface

providesWith:List<ClassDesc>

the service class implementations, must not be empty

Returns:ModuleProvideInfo

a service provision description

Exceptions
IllegalArgumentException:
if provides or any of providesWith represents a primitive type, or the number of implementations exceeds the limit of u2
ofback to summary
public static ModuleProvideInfo of(ClassDesc provides, ClassDesc... providesWith)

Returns a service provision description.

Parameters
provides:ClassDesc

the service class interface

providesWith:ClassDesc[]

the service class implementations, must not be empty

Returns:ModuleProvideInfo

a service provision description

Exceptions
IllegalArgumentException:
if provides or any of providesWith represents a primitive type, or the number of implementations exceeds the limit of u2
providesback to summary
public ClassEntry provides()

Returns the service interface representing the provided service.

Returns:ClassEntry

the service interface representing the provided service

See Also
ModuleDescriptor.Provides#service()
providesWithback to summary
public List<ClassEntry> providesWith()

Returns the classes providing the service implementation. The list should not be empty.

Returns:List<ClassEntry>

the classes providing the service implementation

See Also
ModuleDescriptor.Provides#providers()