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:
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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
Returns a service provision description.static ModuleProvideInfo
Returns a service provision description.provides()
Returns the service interface representing the provided service.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:
-
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:
-
of
Returns a service provision description.- Parameters:
provides
- the service class interfaceprovidesWith
- the service class implementations, must not be empty- Returns:
- a service provision description
-
of
Returns a service provision description.- Parameters:
provides
- the service class interfaceprovidesWith
- the service class implementations, must not be empty- Returns:
- a service provision description
-
of
Returns a service provision description.- Parameters:
provides
- the service class interfaceprovidesWith
- the service class implementations, must not be empty- Returns:
- a service provision description
- Throws:
IllegalArgumentException
- ifprovides
or any ofprovidesWith
represents a primitive type
-
of
Returns a service provision description.- Parameters:
provides
- the service class interfaceprovidesWith
- the service class implementations, must not be empty- Returns:
- a service provision description
- Throws:
IllegalArgumentException
- ifprovides
or any ofprovidesWith
represents a primitive type
-