Interface IModuleBinding

All Superinterfaces:
IBinding

public interface IModuleBinding extends IBinding
A module binding represents a module (added in JLS9 API).
Since:
3.14
Restriction:
This interface is not intended to be implemented by clients.
  • Method Details

    • getKind

      default int getKind()
      Description copied from interface: IBinding
      Returns the kind of bindings this is. That is one of the kind constants: PACKAGE, TYPE, VARIABLE, METHOD, ANNOTATION, MEMBER_VALUE_PAIR, or MODULE.

      Note that additional kinds might be added in the future, so clients should not assume this list is exhaustive and should program defensively, e.g. by having a reasonable default in a switch statement.

      Specified by:
      getKind in interface IBinding
      Returns:
      one of the kind constants
    • isOpen

      boolean isOpen()
      Returns whether this module is open or not.
      Returns:
      true if open, false otherwise
    • getRequiredModules

      IModuleBinding[] getRequiredModules()
      Returns all required modules.

      The resulting bindings are in no particular order.

      Returns:
      all required modules
    • getExportedPackages

      IPackageBinding[] getExportedPackages()
      Returns all exported packages.

      The resulting bindings are in no particular order.

      Returns:
      array of exported package bindings
    • getExportedTo

      String[] getExportedTo(IPackageBinding packageBinding)
      If this module exports the given package to specific modules, returns the array of names of modules, otherwise returns an empty array.
      Parameters:
      packageBinding - a package binding for which targeted modules are declared
      Returns:
      array of names of targeted modules
    • getOpenedPackages

      IPackageBinding[] getOpenedPackages()
      Returns all opened packages.

      The resulting bindings are in no particular order.

      Returns:
      array of package bindings
    • getOpenedTo

      String[] getOpenedTo(IPackageBinding packageBinding)
      If this module opens the given package to specific modules, returns the array of names of modules, otherwise returns an empty array.

      The resulting bindings are in no particular order.

      Parameters:
      packageBinding - a package binding for which targeted modules are declared
      Returns:
      array of names of targeted modules
    • getUses

      ITypeBinding[] getUses()
      Returns the services used by this module.

      The resulting bindings are in no particular order.

      Returns:
      array of type bindings
    • getServices

      ITypeBinding[] getServices()
      Returns the services provided by this module.

      The resulting services are in no particular order.

      Returns:
      array of services
    • getImplementations

      ITypeBinding[] getImplementations(ITypeBinding service)
      Returns the implementations that implement the given service in this module.
      Returns:
      array of implementation type bindings, in declaration order