Interface ContainerGroup
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Subinterfaces:
ModuleContainerGroup
,OutputContainerGroup
,PackageContainerGroup
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 TypeMethodDescriptionboolean
contains
(PathFileObject fileObject) 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.<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.
-
Method Details
-
contains
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, orfalse
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
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.
-