Top Description Methods
java.lang.classfile.attribute

public sealed Interface ModuleProvideInfo

Known Direct Implementers
jdk.internal.classfile.impl.UnboundAttribute.UnboundModuleProvideInfo
Annotations
@PreviewFeature
feature:CLASSFILE_API
Imports
java.lang.constant.ClassDesc, java.util.Arrays, .List, java.lang.classfile.constantpool.ClassEntry, jdk.internal.classfile.impl.TemporaryConstantPool, .UnboundAttribute, .Util, jdk.internal.javac.PreviewFeature

Preview

Second Preview of ClassFile API (JEP 466).

Programs can only use ModuleProvideInfo when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.

Models a single "provides" declaration in the ModuleAttribute.
Since
22

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
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
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
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
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

Returns:ModuleProvideInfo

a service provision description

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

Returns:ModuleProvideInfo

a service provision description

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

Returns:ModuleProvideInfo

a service provision description

Exceptions
IllegalArgumentException:
if provides represents a primitive type
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

Returns:ModuleProvideInfo

a service provision description

Exceptions
IllegalArgumentException:
if provides or any of providesWith represents a primitive type
providesback to summary
public ClassEntry provides()

Returns the service interface representing the provided service.

Returns:ClassEntry

the service interface representing the provided service

providesWithback to summary
public List<ClassEntry> providesWith()

Returns the classes providing the service implementation.

Returns:List<ClassEntry>

the classes providing the service implementation