Interface LibraryContainer<T extends Archive<T>>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T addAsLibraries​(java.io.File... resources)
      Add multiple File to this Archive as libraries to the container, returning the container itself.
      T addAsLibraries​(java.lang.String... resourceNames)
      Add multiple resources to this Archive as libraries to the container, returning the container itself.
      T addAsLibraries​(java.util.Collection<? extends Archive<?>> archives)
      Add multiple Archives to this Archive as libraries to the container, returning the container itself.
      T addAsLibraries​(Archive<?>... archives)
      Add multiple Archives to this Archive as libraries to the container, returning the container itself.
      T addAsLibraries​(Archive<?>[]... archives)
      Add multiple Archives to this Archive as libraries to the container, returning the container itself.
      T addAsLibrary​(java.io.File resource)
      Adds the File as a library to the container, returning the container itself.
      T addAsLibrary​(java.io.File resource, java.lang.String target)
      Adds the File as a library to the container, returning the container itself.
      T addAsLibrary​(java.io.File resource, ArchivePath target)
      Adds the File as a library to the container, returning the container itself.
      T addAsLibrary​(java.lang.String resourceName)
      Adds the resource as a library to the container, returning the container itself.
      T addAsLibrary​(java.lang.String resourceName, java.lang.String target)
      Adds the resource as a library to the container, returning the container itself.
      T addAsLibrary​(java.lang.String resourceName, ArchivePath target)
      Adds the resource as a library to the container, returning the container itself.
      T addAsLibrary​(java.net.URL resource, java.lang.String target)
      Adds the URL as a library to the container, returning the container itself.
      T addAsLibrary​(java.net.URL resource, ArchivePath target)
      Adds the URL as a library to the container, returning the container itself.
      T addAsLibrary​(Archive<?> archive)
      Add another Archive to this Archive as a library to the container, returning the container itself.
      T addAsLibrary​(Asset resource, java.lang.String target)
      Adds the Asset as a library to the container, returning the container itself.
      T addAsLibrary​(Asset resource, ArchivePath target)
      Adds the Asset as a library to the container, returning the container itself.
    • Method Detail

      • addAsLibrary

        T addAsLibrary​(java.lang.String resourceName)
                throws java.lang.IllegalArgumentException
        Adds the resource as a library to the container, returning the container itself.
        The resource will be placed into the Container Library path under the same context from which it was retrieved.

        The ClassLoader used to obtain the resource is up to the implementation.
        Parameters:
        resourceName - resource to add
        Returns:
        This virtual archive
        Throws:
        java.lang.IllegalArgumentException - if resourceName is null
        See Also:
        addAsLibrary(Asset, ArchivePath)
      • addAsLibrary

        T addAsLibrary​(java.io.File resource)
                throws java.lang.IllegalArgumentException
        Adds the File as a library to the container, returning the container itself.
        The File will be placed into the Container Library path under File.getName().
        Parameters:
        resource - File resource to add
        Returns:
        This virtual archive
        Throws:
        java.lang.IllegalArgumentException - if resourceName is null
        See Also:
        addAsLibrary(Asset, ArchivePath)
      • addAsLibrary

        T addAsLibrary​(java.lang.String resourceName,
                       java.lang.String target)
                throws java.lang.IllegalArgumentException
        Adds the resource as a library to the container, returning the container itself.

        The ClassLoader used to obtain the resource is up to the implementation.
        Parameters:
        resourceName - resource to add
        target - The target path within the archive in which to add the resource, relative to the Archives library path.
        Returns:
        This virtual archive
        Throws:
        java.lang.IllegalArgumentException - if resourceName is null
        java.lang.IllegalArgumentException - if target is null
        See Also:
        addAsLibrary(Asset, ArchivePath)
      • addAsLibrary

        T addAsLibrary​(java.io.File resource,
                       java.lang.String target)
                throws java.lang.IllegalArgumentException
        Adds the File as a library to the container, returning the container itself.
        Parameters:
        resource - File resource to add
        target - The target path within the archive in which to add the resource, relative to the Archives library path.
        Returns:
        This virtual archive
        Throws:
        java.lang.IllegalArgumentException - if resource is null
        java.lang.IllegalArgumentException - if target is null
        See Also:
        addAsLibrary(Asset, ArchivePath)
      • addAsLibrary

        T addAsLibrary​(java.net.URL resource,
                       java.lang.String target)
                throws java.lang.IllegalArgumentException
        Adds the URL as a library to the container, returning the container itself.
        Parameters:
        resource - URL resource to add
        target - The target path within the archive in which to add the resource, relative to the Archives library path.
        Returns:
        This virtual archive
        Throws:
        java.lang.IllegalArgumentException - if resource is null
        java.lang.IllegalArgumentException - if target is null
        See Also:
        addAsLibrary(Asset, ArchivePath)
      • addAsLibrary

        T addAsLibrary​(Asset resource,
                       java.lang.String target)
                throws java.lang.IllegalArgumentException
        Adds the Asset as a library to the container, returning the container itself.
        Parameters:
        resource - Asset resource to add
        target - The target path within the archive in which to add the resource, relative to the Archives library path.
        Returns:
        This virtual archive
        Throws:
        java.lang.IllegalArgumentException - if resource is null
        java.lang.IllegalArgumentException - if target is null
        See Also:
        addAsLibrary(Asset, ArchivePath)
      • addAsLibrary

        T addAsLibrary​(java.lang.String resourceName,
                       ArchivePath target)
                throws java.lang.IllegalArgumentException
        Adds the resource as a library to the container, returning the container itself.

        The ClassLoader used to obtain the resource is up to the implementation.
        Parameters:
        resourceName - resource to add
        target - The target path within the archive in which to add the resource, relative to the Archives library path.
        Returns:
        This virtual archive
        Throws:
        java.lang.IllegalArgumentException - if resourceName is null
        java.lang.IllegalArgumentException - if target is null
        See Also:
        addAsLibrary(Asset, ArchivePath)
      • addAsLibrary

        T addAsLibrary​(java.io.File resource,
                       ArchivePath target)
                throws java.lang.IllegalArgumentException
        Adds the File as a library to the container, returning the container itself.
        Parameters:
        resource - File resource to add
        target - The target path within the archive in which to add the resource, relative to the Archives library path.
        Returns:
        This virtual archive
        Throws:
        java.lang.IllegalArgumentException - if resource is null
        java.lang.IllegalArgumentException - if target is null
        See Also:
        addAsLibrary(Asset, ArchivePath)
      • addAsLibrary

        T addAsLibrary​(java.net.URL resource,
                       ArchivePath target)
                throws java.lang.IllegalArgumentException
        Adds the URL as a library to the container, returning the container itself.
        Parameters:
        resource - URL resource to add
        target - The target path within the archive in which to add the resource, relative to the Archives library path.
        Returns:
        This virtual archive
        Throws:
        java.lang.IllegalArgumentException - if resource is null
        java.lang.IllegalArgumentException - if target is null
        See Also:
        addAsLibrary(Asset, ArchivePath)
      • addAsLibrary

        T addAsLibrary​(Asset resource,
                       ArchivePath target)
                throws java.lang.IllegalArgumentException
        Adds the Asset as a library to the container, returning the container itself.
        Parameters:
        target - The target path within the archive in which to add the resource, relative to the Archives library path.
        resource - Asset resource to add
        Returns:
        This virtual archive
        Throws:
        java.lang.IllegalArgumentException - if resource is null
        java.lang.IllegalArgumentException - if target is null
      • addAsLibrary

        T addAsLibrary​(Archive<?> archive)
                throws java.lang.IllegalArgumentException
        Add another Archive to this Archive as a library to the container, returning the container itself.
        The Archive will be placed into the Container Library path under Archive.getName().
        Parameters:
        archive - Archive resource to add
        Returns:
        This virtual archive
        Throws:
        java.lang.IllegalArgumentException - if Archive is null
        See Also:
        addAsLibrary(Asset, ArchivePath)
      • addAsLibraries

        T addAsLibraries​(java.lang.String... resourceNames)
                  throws java.lang.IllegalArgumentException
        Add multiple resources to this Archive as libraries to the container, returning the container itself.
        The resources will be placed into the Container Library path under the same context from which they were retrieved.

        The ClassLoader used to obtain the resource is up to the implementation.
        Parameters:
        resourceNames - resources to add
        Returns:
        This virtual archive
        Throws:
        java.lang.IllegalArgumentException - if resourceNames are null or empty
        See Also:
        addAsLibrary(String)
      • addAsLibraries

        T addAsLibraries​(java.io.File... resources)
                  throws java.lang.IllegalArgumentException
        Add multiple File to this Archive as libraries to the container, returning the container itself.
        The Files will be placed into the Container Library path under File.getName().
        Parameters:
        resources - File resources to add
        Returns:
        This virtual archive
        Throws:
        java.lang.IllegalArgumentException - if File resources are null or empty
        See Also:
        addAsLibrary(File)
      • addAsLibraries

        T addAsLibraries​(Archive<?>... archives)
                  throws java.lang.IllegalArgumentException
        Add multiple Archives to this Archive as libraries to the container, returning the container itself.
        The Archives will be placed into the Container Library path under Archive.getName().
        Parameters:
        archives - Archive resources to add
        Returns:
        This virtual archive
        Throws:
        java.lang.IllegalArgumentException - if Archive resources are null
        See Also:
        addAsLibrary(Archive)
      • addAsLibraries

        T addAsLibraries​(java.util.Collection<? extends Archive<?>> archives)
                  throws java.lang.IllegalArgumentException
        Add multiple Archives to this Archive as libraries to the container, returning the container itself.
        The Archives will be placed into the Container Library path under Archive.getName().
        Parameters:
        archives - Archive resources to add
        Returns:
        This virtual archive
        Throws:
        java.lang.IllegalArgumentException - if Collection of archives is null
        See Also:
        addAsLibrary(Archive)
      • addAsLibraries

        T addAsLibraries​(Archive<?>[]... archives)
                  throws java.lang.IllegalArgumentException
        Add multiple Archives to this Archive as libraries to the container, returning the container itself.
        The Archives will be placed into the Container Library path under Archive.getName().
        Parameters:
        archives - Archive resources to add
        Returns:
        This virtual archive
        Throws:
        java.lang.IllegalArgumentException - if Collection of archives is null
        See Also:
        addAsLibrary(Archive)