Interface ContainerGroup

All Superinterfaces:
AutoCloseable, Closeable
All Known Subinterfaces:
ModuleContainerGroup, OutputContainerGroup, PackageContainerGroup

public interface ContainerGroup extends Closeable
Base container group interface.

Closing an implementation of this interface will free up any internal resources that have been opened. Resources passed to the implementation in an already-open state will not be closed.

Since:
0.0.1
Author:
Ashley Scopes
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Determine whether this group contains the given file object anywhere.
    Get the location of this container group.
    Get the effective Java release being targeted by the compiler that owns this container group.
    getServiceLoader(Class<S> service)
    Get a service loader for the given service class, or throw an exception if the operation is not supported.

    Methods inherited from interface java.io.Closeable

    close
  • Method Details

    • contains

      boolean contains(PathFileObject fileObject)
      Determine whether this group contains the given file object anywhere.
      Parameters:
      fileObject - the file object to look for.
      Returns:
      true if the file object is contained in this group, or false otherwise.
    • getLocation

      Get the location of this container group.
      Returns:
      the location.
    • getRelease

      Get the effective Java release being targeted by the compiler that owns this container group.

      This is used to calculate Multi-Release JAR packages correctly.

      Returns:
      the effective release version.
    • getServiceLoader

      <S> ServiceLoader<S> getServiceLoader(Class<S> service)
      Get a service loader for the given service class, or throw an exception if the operation is not supported.
      Type Parameters:
      S - the service class type.
      Parameters:
      service - the service class to get.
      Returns:
      the service loader.
      Throws:
      UnsupportedOperationException - if the container group does not provide this functionality.