Class WebContainerBase<T extends Archive<T>>
java.lang.Object
org.jboss.shrinkwrap.impl.base.AssignableBase<Archive<?>>
org.jboss.shrinkwrap.impl.base.container.ContainerBase<T>
org.jboss.shrinkwrap.impl.base.container.WebContainerBase<T>
- Type Parameters:
T-
- All Implemented Interfaces:
Archive<T>,Assignable,ClassContainer<T>,LibraryContainer<T>,ManifestContainer<T>,ResourceContainer<T>,ServiceProviderContainer<T>,WebContainer<T>,ArchiveFormatAssociable
- Direct Known Subclasses:
WebArchiveImpl
public abstract class WebContainerBase<T extends Archive<T>>
extends ContainerBase<T>
implements WebContainer<T>
WebContainerBase
Abstract class that helps implement the WebContainer. Used by specs that extends the WebContainer.
- Version:
- $Revision: $
-
Field Summary
Fields inherited from interface org.jboss.shrinkwrap.api.container.ManifestContainer
DEFAULT_MANIFEST_NAME -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedWebContainerBase(Class<T> actualType, Archive<?> archive) -
Method Summary
Modifier and TypeMethodDescriptionaddAsServiceProvider(Class<?> serviceInterface, Class<?>... serviceImpls) Adds a META-INF/services/ServiceInterfaceNameAssetrepresenting this service.addAsServiceProvider(String serviceInterface, String... serviceImpls) Adds a META-INF/services/ServiceInterfaceNameAssetrepresenting this service.addAsServiceProviderAndClasses(Class<?> serviceInterface, Class<?>... serviceImpls) Adds a META-INF/services/ServiceInterfaceNameAssetand the classes related to the service to the archive.addAsWebInfResource(File resource) Adds theFileas a WEB-INF resource to the container, returning the container itself.addAsWebInfResource(File resource, String target) Adds theFileas a WEB-INF resource to the container, returning the container itself.addAsWebInfResource(File resource, ArchivePath target) Adds theFileas a WEB-INF resource to the container, returning the container itself.addAsWebInfResource(Package resourcePackage, String resourceName) Adds the resource as a WEB-INF resource to the container, returning the container itself.addAsWebInfResource(Package resourcePackage, String resourceName, String target) Adds the resource as a WEB-INF resource to a specific path inside the container, returning the container itself.addAsWebInfResource(Package resourcePackage, String resourceName, ArchivePath target) Adds the resource as a WEB-INF resource to a specific path inside the container, returning the container itself.addAsWebInfResource(String resourceName) Adds the resource as a WEB-INF resource to the container, returning the container itself.addAsWebInfResource(String resourceName, String target) Adds the resource as a WEB-INF resource to the container, returning the container itself.addAsWebInfResource(String resourceName, ArchivePath target) Adds the resource as a WEB-INF resource to the container, returning the container itself.addAsWebInfResource(URL resource, String target) Adds theURLas a WEB-INF resource to the container, returning the container itself.addAsWebInfResource(URL resource, ArchivePath target) Adds theURLas a WEB-INF resource to the container, returning the container itself.addAsWebInfResource(Asset resource, String target) Adds theAssetas a WEB-INF resource to the container, returning the container itself.addAsWebInfResource(Asset resource, ArchivePath target) Adds theAssetas a WEB-INF resource to the container, returning the container itself.addAsWebInfResources(Package resourcePackage, String... resourceNames) Adds the resources inside the package as multiple WEB-INF resources to the container, returning the container itself.addAsWebResource(File resource) Adds theFileas a Web resource to the container, returning the container itself.addAsWebResource(File resource, String target) Adds theFileas a Web resource to the container, returning the container itself.addAsWebResource(File resource, ArchivePath target) Adds theFileas a Web resource to the container, returning the container itself.addAsWebResource(Package resourcePackage, String resourceName) Adds the resource as a resource to the container, returning the container itself.addAsWebResource(Package resourcePackage, String resourceName, String target) Adds the resource as a resource to a specific path inside the container, returning the container itself.addAsWebResource(Package resourcePackage, String resourceName, ArchivePath target) Adds the resource as a resource to a specific path inside the container, returning the container itself.addAsWebResource(String resourceName) Adds the resource as a Web resource to the container, returning the container itself.addAsWebResource(String resourceName, String target) Adds the resource as a Web resource to the container, returning the container itself.addAsWebResource(String resourceName, ArchivePath target) Adds the resource as a Web resource to the container, returning the container itself.addAsWebResource(URL resource, String target) Adds theURLas a Web resource to the container, returning the container itself.addAsWebResource(URL resource, ArchivePath target) Adds theURLas a Web resource to the container, returning the container itself.addAsWebResource(Asset resource, String target) Adds theAssetas a Web resource to the container, returning the container itself.addAsWebResource(Asset resource, ArchivePath target) Adds theAssetas a Web resource to the container, returning the container itself.addAsWebResources(Package resourcePackage, String... resourceNames) Adds the resources inside the package as multiple resources to the container, returning the container itself.protected abstract ArchivePathReturns the path to web container service providersprotected abstract ArchivePathReturns the path to WEB-INFprotected abstract ArchivePathReturns the path to web resourcesAdds theFileas web.xml to the container, returning the container itself.Adds the resource inside the package as web.xml to the container, returning the container itself.Adds the resource as web.xml to the container, returning the container itself.Adds theURLas web.xml to the container, returning the container itself.Adds theAssetas web.xml to the container, returning the container itself.Methods inherited from class org.jboss.shrinkwrap.impl.base.container.ContainerBase
add, add, add, add, add, add, add, addAsDirectories, addAsDirectories, addAsDirectory, addAsDirectory, addAsLibraries, addAsLibraries, addAsLibraries, addAsLibraries, addAsLibraries, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResources, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResources, addClass, addClass, addClass, addClasses, addDefaultPackage, addHandlers, addManifest, addPackage, addPackage, addPackages, addPackages, addPackages, addPackages, contains, contains, covarientReturn, delete, delete, deleteClass, deleteClass, deleteClasses, deleteDefaultPackage, deletePackage, deletePackage, deletePackages, deletePackages, deletePackages, deletePackages, equals, filter, get, get, getActualClass, getArchiveFormat, getAsType, getAsType, getAsType, getAsType, getAsType, getAsType, getClassesPath, getContent, getContent, getId, getLibraryPath, getManifestPath, getName, getResourcePath, hashCode, merge, merge, merge, merge, merge, merge, move, move, setManifest, setManifest, setManifest, setManifest, setManifest, shallowCopy, shallowCopy, toString, toString, toString, writeToMethods inherited from class org.jboss.shrinkwrap.impl.base.AssignableBase
as, getArchiveMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jboss.shrinkwrap.api.Assignable
as
-
Constructor Details
-
WebContainerBase
-
-
Method Details
-
getWebPath
Returns the path to web resources- Returns:
- Base Path for the web resources
-
getWebInfPath
Returns the path to WEB-INF- Returns:
- the path to WEB-INF
-
getServiceProvidersPath
Returns the path to web container service providers- Returns:
- the path to web container service providers
-
setWebXML
Description copied from interface:WebContainerAdds the resource as web.xml to the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Specified by:
setWebXMLin interfaceWebContainer<T extends Archive<T>>- Parameters:
resourceName- resource to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resourceName is null- See Also:
-
setWebXML
Description copied from interface:WebContainerAdds theFileas web.xml to the container, returning the container itself.- Specified by:
setWebXMLin interfaceWebContainer<T extends Archive<T>>- Parameters:
resource-Fileresource to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resource is null- See Also:
-
setWebXML
Description copied from interface:WebContainerAdds theURLas web.xml to the container, returning the container itself.- Specified by:
setWebXMLin interfaceWebContainer<T extends Archive<T>>- Parameters:
resource-URLresource to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resource is null- See Also:
-
setWebXML
Description copied from interface:WebContainerAdds theAssetas web.xml to the container, returning the container itself.- Specified by:
setWebXMLin interfaceWebContainer<T extends Archive<T>>- Parameters:
resource-Assetresource to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resource is null
-
setWebXML
Description copied from interface:WebContainerAdds the resource inside the package as web.xml to the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Specified by:
setWebXMLin interfaceWebContainer<T extends Archive<T>>- Parameters:
resourcePackage- The package of the resourcesresourceName- The name of the resources inside resourcePackage- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resourcePackage is nullIllegalArgumentException- if resourceName is null
-
addAsWebResource
Description copied from interface:WebContainerAdds the resource as a Web resource to the container, returning the container itself.
The resource will be placed into the Container Web path under the same context from which it was retrieved.
TheClassLoaderused to obtain the resource is up to the implementation.- Specified by:
addAsWebResourcein interfaceWebContainer<T extends Archive<T>>- Parameters:
resourceName- resource to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resourceName is nullIllegalArgumentException- if target is null- See Also:
-
addAsWebResource
Description copied from interface:WebContainerAdds theFileas a Web resource to the container, returning the container itself.
TheFilewill be placed into the Container Web path underFile.getName().- Specified by:
addAsWebResourcein interfaceWebContainer<T extends Archive<T>>- Parameters:
resource- resource to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- ifFileresource is nullIllegalArgumentException- if target is null- See Also:
-
addAsWebResource
Description copied from interface:WebContainerAdds the resource as a Web resource to the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Specified by:
addAsWebResourcein interfaceWebContainer<T extends Archive<T>>- Parameters:
resourceName- resource to addtarget- The target path within the archive in which to add the resource, relative to theArchives web path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resourceName is nullIllegalArgumentException- if target is null- See Also:
-
addAsWebResource
Description copied from interface:WebContainerAdds theFileas a Web resource to the container, returning the container itself.- Specified by:
addAsWebResourcein interfaceWebContainer<T extends Archive<T>>- Parameters:
resource-Fileresource to addtarget- The target path within the archive in which to add the resource, relative to theArchives web path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resource is nullIllegalArgumentException- if target is null- See Also:
-
addAsWebResource
Description copied from interface:WebContainerAdds theURLas a Web resource to the container, returning the container itself.- Specified by:
addAsWebResourcein interfaceWebContainer<T extends Archive<T>>- Parameters:
resource-URLresource to addtarget- The target path within the archive in which to add the resource, relative to theArchives web path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resource is nullIllegalArgumentException- if target is null- See Also:
-
addAsWebResource
Description copied from interface:WebContainerAdds theAssetas a Web resource to the container, returning the container itself.- Specified by:
addAsWebResourcein interfaceWebContainer<T extends Archive<T>>- Parameters:
resource-Assetresource to addtarget- The target path within the archive in which to add the resource, relative to theArchives web path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resource is nullIllegalArgumentException- if target is null- See Also:
-
addAsWebResource
Description copied from interface:WebContainerAdds the resource as a Web resource to the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Specified by:
addAsWebResourcein interfaceWebContainer<T extends Archive<T>>- Parameters:
resourceName- resource to addtarget- The target path within the archive in which to add the resource, relative to theArchives web path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resourceName is nullIllegalArgumentException- if target is null- See Also:
-
addAsWebResource
Adds theFileas a Web resource to the container, returning the container itself.- Specified by:
addAsWebResourcein interfaceWebContainer<T extends Archive<T>>- Parameters:
resource-Fileresource to addtarget- The target path within the archive in which to add the resource, relative to theArchives web path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resource is nullIllegalArgumentException- if target is null- See Also:
-
addAsWebResource
Description copied from interface:WebContainerAdds theURLas a Web resource to the container, returning the container itself.- Specified by:
addAsWebResourcein interfaceWebContainer<T extends Archive<T>>- Parameters:
resource-URLresource to addtarget- The target path within the archive in which to add the resource, relative to theArchives web path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resource is nullIllegalArgumentException- if target is null- See Also:
-
addAsWebResource
Adds theAssetas a Web resource to the container, returning the container itself.- Specified by:
addAsWebResourcein interfaceWebContainer<T extends Archive<T>>- Parameters:
resource-Assetresource to addtarget- The target path within the archive in which to add the resource, relative to theArchives web path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resource is nullIllegalArgumentException- if target is null- See Also:
-
addAsWebResources
public T addAsWebResources(Package resourcePackage, String... resourceNames) throws IllegalArgumentException Adds the resources inside the package as multiple resources to the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Specified by:
addAsWebResourcesin interfaceWebContainer<T extends Archive<T>>- Parameters:
resourcePackage- The package of the resourcesresourceNames- The names of the resources inside resoucePackage- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resourcePackage is nullIllegalArgumentException- if no resourceNames are specified or containing null- See Also:
-
addAsWebResource
public T addAsWebResource(Package resourcePackage, String resourceName) throws IllegalArgumentException Description copied from interface:WebContainerAdds the resource as a resource to the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Specified by:
addAsWebResourcein interfaceWebContainer<T extends Archive<T>>- Parameters:
resourcePackage- The package of the resourceresourceName- The name of the resource inside resoucePackage- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resourcePackage is nullIllegalArgumentException- if resourceName is null
-
addAsWebResource
public T addAsWebResource(Package resourcePackage, String resourceName, String target) throws IllegalArgumentException Description copied from interface:WebContainerAdds the resource as a resource to a specific path inside the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Specified by:
addAsWebResourcein interfaceWebContainer<T extends Archive<T>>- Parameters:
resourcePackage- The package of the resourceresourceName- The name of the resource inside resoucePackagetarget- The target location inside the container- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resourcePackage is nullIllegalArgumentException- if resourceName is nullIllegalArgumentException- if target is null
-
addAsWebResource
public T addAsWebResource(Package resourcePackage, String resourceName, ArchivePath target) throws IllegalArgumentException Description copied from interface:WebContainerAdds the resource as a resource to a specific path inside the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Specified by:
addAsWebResourcein interfaceWebContainer<T extends Archive<T>>- Parameters:
resourcePackage- The package of the resourceresourceName- The name of the resource inside resoucePackagetarget- The target location inside the container- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resourcePackage is nullIllegalArgumentException- if resourceName is nullIllegalArgumentException- if target is null
-
addAsWebInfResource
Adds the resource as a WEB-INF resource to the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Specified by:
addAsWebInfResourcein interfaceWebContainer<T extends Archive<T>>- Parameters:
resourceName- resource to add- Returns:
- This
Archive - Throws:
IllegalArgumentException- if resourceName is not specified- See Also:
-
addAsWebInfResource
Adds theFileas a WEB-INF resource to the container, returning the container itself.
TheFilewill be placed into the Container WEB-INF path underFile.getName().- Specified by:
addAsWebInfResourcein interfaceWebContainer<T extends Archive<T>>- Parameters:
resource- Resource to add- Returns:
- This
Archive - Throws:
IllegalArgumentException- ifFileresource is null- See Also:
-
addAsWebInfResource
Adds the resource as a WEB-INF resource to the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Specified by:
addAsWebInfResourcein interfaceWebContainer<T extends Archive<T>>- Parameters:
resourceName- resource to addtarget- The target path within the archive in which to add the resource, relative to theArchives WEB-INF path.- Returns:
- This
Archive - Throws:
IllegalArgumentException- if resourceName or target is not specified- See Also:
-
addAsWebInfResource
Adds theFileas a WEB-INF resource to the container, returning the container itself.- Specified by:
addAsWebInfResourcein interfaceWebContainer<T extends Archive<T>>- Parameters:
resource-Fileresource to addtarget- The target path within the archive in which to add the resource, relative to theArchives WEB-INF path.- Returns:
- This
Archive - Throws:
IllegalArgumentException- If the resource or target is not specified- See Also:
-
addAsWebInfResource
Adds theURLas a WEB-INF resource to the container, returning the container itself.- Specified by:
addAsWebInfResourcein interfaceWebContainer<T extends Archive<T>>- Parameters:
resource-URLresource to addtarget- The target path within the archive in which to add the resource, relative to theArchives WEB-INF path.- Returns:
- This
Archive - Throws:
IllegalArgumentException- If the resource or target is not specified- See Also:
-
addAsWebInfResource
Adds theAssetas a WEB-INF resource to the container, returning the container itself.- Specified by:
addAsWebInfResourcein interfaceWebContainer<T extends Archive<T>>- Parameters:
resource-Assetresource to addtarget- The target path within the archive in which to add the resource, relative to theArchives WEB-INF path.- Returns:
- This
Archive - Throws:
IllegalArgumentException- If the resource or target is not specified- See Also:
-
addAsWebInfResource
public T addAsWebInfResource(String resourceName, ArchivePath target) throws IllegalArgumentException Adds the resource as a WEB-INF resource to the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Specified by:
addAsWebInfResourcein interfaceWebContainer<T extends Archive<T>>- Parameters:
resourceName- resource to addtarget- The target path within the archive in which to add the resource, relative to theArchives WEB-INF path.- Returns:
- This
Archive - Throws:
IllegalArgumentException- If the resource or target is not specified- See Also:
-
addAsWebInfResource
Adds theFileas a WEB-INF resource to the container, returning the container itself.- Specified by:
addAsWebInfResourcein interfaceWebContainer<T extends Archive<T>>- Parameters:
resource-Fileresource to addtarget- The target path within the archive in which to add the resource, relative to theArchives WEB-INF path.- Returns:
- This
Archive - Throws:
IllegalArgumentException- If the resource or target is not specified- See Also:
-
addAsWebInfResource
Adds theURLas a WEB-INF resource to the container, returning the container itself.- Specified by:
addAsWebInfResourcein interfaceWebContainer<T extends Archive<T>>- Parameters:
resource-URLresource to addtarget- The target path within the archive in which to add the resource, relative to theArchives WEB-INF path.- Returns:
- This
Archive - Throws:
IllegalArgumentException- If the resource or target is not specified- See Also:
-
addAsWebInfResource
Adds theAssetas a WEB-INF resource to the container, returning the container itself.- Specified by:
addAsWebInfResourcein interfaceWebContainer<T extends Archive<T>>- Parameters:
resource-Assetresource to addtarget- The target path within the archive in which to add the resource, relative to theArchives WEB-INF path.- Returns:
- This
Archive - Throws:
IllegalArgumentException- If the resource or target is not specified- See Also:
-
addAsWebInfResources
public T addAsWebInfResources(Package resourcePackage, String... resourceNames) throws IllegalArgumentException Adds the resources inside the package as multiple WEB-INF resources to the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Specified by:
addAsWebInfResourcesin interfaceWebContainer<T extends Archive<T>>- Parameters:
resourcePackage- The package of the resourcesresourceNames- The names of the resources inside resourcePackage- Returns:
- This
Archive - Throws:
IllegalArgumentException- If resourcePackage is null, or if no resourceNames are specified or containing null- See Also:
-
addAsWebInfResource
public T addAsWebInfResource(Package resourcePackage, String resourceName) throws IllegalArgumentException Adds the resource as a WEB-INF resource to the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Specified by:
addAsWebInfResourcein interfaceWebContainer<T extends Archive<T>>- Parameters:
resourcePackage- The package of the resourceresourceName- The name of the resource inside resourcePackage- Returns:
- This
Archive - Throws:
IllegalArgumentException- If the package or resource name is not specified- See Also:
-
addAsWebInfResource
public T addAsWebInfResource(Package resourcePackage, String resourceName, String target) throws IllegalArgumentException Adds the resource as a WEB-INF resource to a specific path inside the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Specified by:
addAsWebInfResourcein interfaceWebContainer<T extends Archive<T>>- Parameters:
resourcePackage- The package of the resourceresourceName- The name of the resource inside resoucePackagetarget- The target location inside the container- Returns:
- This
Archive - Throws:
IllegalArgumentException- If the package, resource name, or target is not specified- See Also:
-
addAsWebInfResource
public T addAsWebInfResource(Package resourcePackage, String resourceName, ArchivePath target) throws IllegalArgumentException Adds the resource as a WEB-INF resource to a specific path inside the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Specified by:
addAsWebInfResourcein interfaceWebContainer<T extends Archive<T>>- Parameters:
resourcePackage- The package of the resourceresourceName- The name of the resource inside resoucePackagetarget- The target location inside the container- Returns:
- This
Archive - Throws:
IllegalArgumentException- If the package, resource name, or target is not specified- See Also:
-
addAsServiceProvider
public T addAsServiceProvider(Class<?> serviceInterface, Class<?>... serviceImpls) throws IllegalArgumentException Description copied from interface:ManifestContainerAdds a META-INF/services/ServiceInterfaceNameAssetrepresenting this service. Warning: this method does not add the specified classes to the archive.- Specified by:
addAsServiceProviderin interfaceManifestContainer<T extends Archive<T>>- Overrides:
addAsServiceProviderin classContainerBase<T extends Archive<T>>- Parameters:
serviceInterface- The Service Interface classserviceImpls- The Service Interface Implementations- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if serviceInterface is nullIllegalArgumentException- if serviceImpls is null or contain null values
-
addAsServiceProvider
public T addAsServiceProvider(String serviceInterface, String... serviceImpls) throws IllegalArgumentException Description copied from interface:ManifestContainerAdds a META-INF/services/ServiceInterfaceNameAssetrepresenting this service.- Specified by:
addAsServiceProviderin interfaceManifestContainer<T extends Archive<T>>- Overrides:
addAsServiceProviderin classContainerBase<T extends Archive<T>>- Parameters:
serviceInterface- The Service Interface class nameserviceImpls- The Service Interface Implementations class names- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if serviceInterface is nullIllegalArgumentException- if serviceImpls is null or contain null values- See Also:
-
addAsServiceProviderAndClasses
public T addAsServiceProviderAndClasses(Class<?> serviceInterface, Class<?>... serviceImpls) throws IllegalArgumentException Description copied from interface:ServiceProviderContainerAdds a META-INF/services/ServiceInterfaceNameAssetand the classes related to the service to the archive.- Specified by:
addAsServiceProviderAndClassesin interfaceServiceProviderContainer<T extends Archive<T>>- Overrides:
addAsServiceProviderAndClassesin classContainerBase<T extends Archive<T>>- Parameters:
serviceInterface- The Service Interface classserviceImpls- The Service Interface Implementations- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if serviceInterface is nullIllegalArgumentException- if serviceImpls is null or contain null values
-