ModuleElement.ProvidesDirective (Java SE 23 & JDK 23)
Description: declaration: module: java.compiler, package: javax.lang.model.element, interface: ModuleElement, interface: ProvidesDirective
Keywords: javax.lang.model.element.ModuleElement.ProvidesDirective interface

# Interface ModuleElement.ProvidesDirective

All Superinterfaces:
  `ModuleElement.Directive`

Enclosing interface:
  `ModuleElement`

public static interface ModuleElement.ProvidesDirective extends ModuleElement.Directive
An implementation of a service provided by a module.

Since:
  9

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<? extends TypeElement>`
  `getImplementations()`
  Returns the implementations of the service being provided.
  `TypeElement`
  `getService()`
  Returns the service being provided.

  ### Methods declared in interface javax.lang.model.element.ModuleElement.Directive

  `accept, getKind`

- ## Method Details

  - ### getService

    TypeElement getService()
    Returns the service being provided.
    Returns:
      the service being provided

  - ### getImplementations

    List<? extends TypeElement> getImplementations()
    Returns the implementations of the service being provided.
    Returns:
      the implementations of the service being provided