Interface OutputContainerGroup
- All Superinterfaces:
- AutoCloseable, Closeable, ContainerGroup, ModuleContainerGroup, PackageContainerGroup
These can behave as if they are module-oriented, or non-module-oriented. It is down to the implementation to mediate access between modules and their files.
Operations on modules should first get or
create the module, and then operate on that sub-container
group. Operations on non-module packages should operate on this container group directly.
Note that each container group will usually only support one package container group in the outputs. This is due to the JSR-199 API not providing a method for specifying which output location to write files to for legacy-style packages.
- Since:
- 0.0.1
- Author:
- Ashley Scopes
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddPackage(Container container) Add a container to this group.voidaddPackage(PathRoot path) Add a path to this group.Get the output-oriented location.Get the package containers in this group.Methods inherited from interface ContainerGroupcontains, getRelease, getServiceLoaderMethods inherited from interface ModuleContainerGroupaddModule, addModule, getLocationsForModules, getModule, getModules, getOrCreateModule, hasLocationMethods inherited from interface PackageContainerGroupgetClassLoader, getFile, getFileForInput, getFileForOutput, getJavaFileForInput, getJavaFileForOutput, inferBinaryName, isEmpty, listAllFiles, listFileObjects
- 
Method Details- 
addPackageAdd a path to this group.Note that this will destroy the class loaderif one is already allocated from a previous request.If the path points to some form of archive (such as a JAR), then this may open that archive in a new resource internally. If this occurs, then the resource will always be freed by this class by calling Closeable.close().Any other closable resources passed to this function will not be closed by this implementation. You must handle the lifecycle of those objects yourself. Note that this implementation will only ever allow a single container in the package container groups. If a container is already present, then an exception will be thrown. - Specified by:
- addPackagein interface- PackageContainerGroup
- Parameters:
- path- the path to add.
- Throws:
- IllegalStateException- if a package already exists in this location.
 
- 
addPackageAdd a container to this group.The provided container will be closed when this group is closed. Note that this will destroy the class loaderif one is already allocated from a previous request.Note that this implementation will only ever allow a single container in the package container groups. If a container is already present, then an exception will be thrown. - Specified by:
- addPackagein interface- PackageContainerGroup
- Parameters:
- container- the container to add.
- Throws:
- IllegalStateException- if a package already exists in this location.
 
- 
getLocationGet the output-oriented location.- Specified by:
- getLocationin interface- ContainerGroup
- Specified by:
- getLocationin interface- ModuleContainerGroup
- Specified by:
- getLocationin interface- PackageContainerGroup
- Returns:
- the output-oriented location.
 
- 
getPackagesGet the package containers in this group.Returned packages are presented in the order that they were registered. This is the resolution order that the compiler will use. Note that this implementation will only ever return one container in the list due to JSR-199 limitations. - Specified by:
- getPackagesin interface- PackageContainerGroup
- Returns:
- the list containing the package container, if it exists. Otherwise, an empty list is returned instead.
 
 
-