Spec-Zone.ru › OpenJDK 27

Interface ModuleProvideInfo

public sealed interface ModuleProvideInfo
Models a single "provides" declaration in the ModuleAttribute.
See Java Virtual Machine Specification:
4.7.25 The Module Attribute
Since:
24
See Also:
  • ModuleAttribute.provides()
  • ModuleDescriptor.Provides

Method Summary

Modifier and Type Method Description
static ModuleProvideInfo of(ClassEntry provides, ClassEntry... providesWith)
Returns a service provision description.
static ModuleProvideInfo of(ClassEntry provides, List<ClassEntry> providesWith)
Returns a service provision description.
static ModuleProvideInfo of(ClassDesc provides, ClassDesc... providesWith)
Returns a service provision description.
static ModuleProvideInfo of(ClassDesc provides, List<ClassDesc> providesWith)
Returns a service provision description.
ClassEntry provides()
Returns the service interface representing the provided service.
List<ClassEntry> providesWith()
Returns the classes providing the service implementation.

Method Details

provides

ClassEntry provides()
Returns the service interface representing the provided service.
Returns:
the service interface representing the provided service
See Also:
  • ModuleDescriptor.Provides.service()

providesWith

List<ClassEntry> providesWith()
Returns the classes providing the service implementation. The list should not be empty.
Returns:
the classes providing the service implementation
See Also:
  • ModuleDescriptor.Provides.providers()

of

static ModuleProvideInfo of(ClassEntry provides, List<ClassEntry> providesWith)
Returns a service provision description.
Parameters:
provides - the service class interface
providesWith - the service class implementations, must not be empty
Returns:
a service provision description
Throws:
IllegalArgumentException - if the number of implementations exceeds the limit of u2

of

static ModuleProvideInfo of(ClassEntry provides, ClassEntry... providesWith)
Returns a service provision description.
Parameters:
provides - the service class interface
providesWith - the service class implementations, must not be empty
Returns:
a service provision description
Throws:
IllegalArgumentException - if the number of implementations exceeds the limit of u2

of

static ModuleProvideInfo of(ClassDesc provides, List<ClassDesc> providesWith)
Returns a service provision description.
Parameters:
provides - the service class interface
providesWith - the service class implementations, must not be empty
Returns:
a service provision description
Throws:
IllegalArgumentException - if provides or any of providesWith represents a primitive type, or the number of implementations exceeds the limit of u2

of

static ModuleProvideInfo of(ClassDesc provides, ClassDesc... providesWith)
Returns a service provision description.
Parameters:
provides - the service class interface
providesWith - the service class implementations, must not be empty
Returns:
a service provision description
Throws:
IllegalArgumentException - if provides or any of providesWith represents a primitive type, or the number of implementations exceeds the limit of u2

Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples. Other versions.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2026, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.

© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API