public interface ResourceContainer<T extends Archive<T>>
ClassLoader, File, and
URL-based Assets as resources within an archive. Archive is up to the implementations/specifications.| Modifier and Type | Method and Description |
|---|---|
T |
addAsResource(Asset resource,
ArchivePath target)
Adds the
Asset as a resource to the container, returning the container itself. |
T |
addAsResource(Asset resource,
java.lang.String target)
Adds the
Asset as a resource to the container, returning the container itself. |
T |
addAsResource(java.io.File resource)
Adds the
File as a resource to the container, returning the container itself. |
T |
addAsResource(java.io.File resource,
ArchivePath target)
Adds the
File as a resource to the container, returning the container itself. |
T |
addAsResource(java.io.File resource,
java.lang.String target)
Adds the
File as a resource to the container, returning the container itself. |
T |
addAsResource(java.lang.Package resourcePackage,
java.lang.String resourceName)
Adds the resource as a resource to the container, returning the container itself.
|
T |
addAsResource(java.lang.Package resourcePackage,
java.lang.String resourceName,
ArchivePath target)
Adds the resource as a resource to a specific path inside the container, returning the container itself.
|
T |
addAsResource(java.lang.Package resourcePackage,
java.lang.String resourceName,
java.lang.String target)
Adds the resource as a resource to a specific path inside the container, returning the container itself.
|
T |
addAsResource(java.lang.String resourceName)
Adds the resource as a resource to the container, returning the container itself.
|
T |
addAsResource(java.lang.String resourceName,
ArchivePath target)
Adds the resource with the specified name to the container, returning the container itself.
|
T |
addAsResource(java.lang.String resourceName,
ArchivePath target,
java.lang.ClassLoader classLoader)
Adds the resource as a resource to the container, returning the container itself.
|
T |
addAsResource(java.lang.String resourceName,
java.lang.String target)
Adds the resource as a resource to the container, returning the container itself.
|
T |
addAsResource(java.net.URL resource,
ArchivePath target)
Adds the
URL as a resource to the container, returning the container itself. |
T |
addAsResource(java.net.URL resource,
java.lang.String target)
Adds the
URL as a resource to the container, returning the container itself. |
T |
addAsResources(java.lang.Package resourcePackage,
java.lang.String... resourceNames)
Adds the resources inside the package as multiple resources to the container, returning the container itself.
|
T addAsResource(java.lang.String resourceName) throws java.lang.IllegalArgumentException
ClassLoader used to obtain the resource is up to the implementation.resourceName - resource to addjava.lang.IllegalArgumentException - If the resourceName is nulladdAsResource(Asset, ArchivePath)T addAsResource(java.io.File resource) throws java.lang.IllegalArgumentException
File as a resource to the container, returning the container itself. File will be placed into the Container Library path under File.getName().resource - File resource to addjava.lang.IllegalArgumentException - If the resource is nulladdAsResource(Asset, ArchivePath)T addAsResource(java.lang.String resourceName, java.lang.String target) throws java.lang.IllegalArgumentException
ClassLoader used to obtain the resource is up to the implementation.resourceName - resource to addtarget - The target path within the archive in which to add the resource, relative to the Archives
resource path.java.lang.IllegalArgumentException - if resourceName is nulljava.lang.IllegalArgumentException - if target is nulladdAsResource(Asset, ArchivePath)T addAsResource(java.io.File resource, java.lang.String target) throws java.lang.IllegalArgumentException
File as a resource to the container, returning the container itself.resource - File resource to addtarget - The target path within the archive in which to add the resource, relative to the Archives
resource path.java.lang.IllegalArgumentException - if resource is nulljava.lang.IllegalArgumentException - if target is nulladdAsResource(Asset, ArchivePath)T addAsResource(java.net.URL resource, java.lang.String target) throws java.lang.IllegalArgumentException
URL as a resource to the container, returning the container itself.resource - URL resource to addtarget - The target path within the archive in which to add the resource, relative to the Archives
resource path.java.lang.IllegalArgumentException - if resource is nulljava.lang.IllegalArgumentException - if target is nulladdAsResource(Asset, ArchivePath)T addAsResource(Asset resource, java.lang.String target) throws java.lang.IllegalArgumentException
Asset as a resource to the container, returning the container itself.resource - Asset resource to addtarget - The target path within the archive in which to add the resource, relative to the Archives
resource path.java.lang.IllegalArgumentException - if resource is nulljava.lang.IllegalArgumentException - if target is nulladdAsResource(Asset, ArchivePath)T addAsResource(java.lang.String resourceName, ArchivePath target) throws java.lang.IllegalArgumentException
ClassLoader used to obtain the resource is up to the implementation.target - The target within the archive into which we'll place the resourceresourceName - Name of the ClassLoader resource to addjava.lang.IllegalArgumentException - If the target is nulljava.lang.IllegalArgumentException - If the resourceName is nullT addAsResource(java.lang.String resourceName, ArchivePath target, java.lang.ClassLoader classLoader) throws java.lang.IllegalArgumentException
ClassLoader used to obtain the resource is up to the implementation.resourceName - resource to addtarget - The target path within the archive in which to add the resource, relative to the Archives
resource path.java.lang.IllegalArgumentException - if resourceName is nulljava.lang.IllegalArgumentException - if target is nulladdAsResource(Asset, ArchivePath)T addAsResource(java.io.File resource, ArchivePath target) throws java.lang.IllegalArgumentException
File as a resource to the container, returning the container itself.resource - File resource to addtarget - The target path within the archive in which to add the resource, relative to the Archives
resource path.java.lang.IllegalArgumentException - if resource is nulljava.lang.IllegalArgumentException - if target is nulladdAsResource(Asset, ArchivePath)T addAsResource(java.net.URL resource, ArchivePath target) throws java.lang.IllegalArgumentException
URL as a resource to the container, returning the container itself.resource - URL resource to addtarget - The target path within the archive in which to add the resource, relative to the Archives
resource path.java.lang.IllegalArgumentException - if resource is nulljava.lang.IllegalArgumentException - if target is nulladdAsResource(Asset, ArchivePath)T addAsResource(Asset resource, ArchivePath target) throws java.lang.IllegalArgumentException
Asset as a resource to the container, returning the container itself.resource - Asset resource to addtarget - The target path within the archive in which to add the resource, relative to the Archives
resource path.java.lang.IllegalArgumentException - if resource is nulljava.lang.IllegalArgumentException - if target is nullT addAsResources(java.lang.Package resourcePackage, java.lang.String... resourceNames) throws java.lang.IllegalArgumentException
ClassLoader used to obtain the resource is up to the implementation.resourcePackage - The package of the resourcesresourceNames - The names of the resources inside resoucePackagejava.lang.IllegalArgumentException - if resourcePackage is nulljava.lang.IllegalArgumentException - if no resourceNames are specified or containing nullT addAsResource(java.lang.Package resourcePackage, java.lang.String resourceName) throws java.lang.IllegalArgumentException
ClassLoader used to obtain the resource is up to the implementation.resourcePackage - The package of the resourceresourceName - The name of the resource inside resoucePackagejava.lang.IllegalArgumentException - if resourcePackage is nulljava.lang.IllegalArgumentException - if resourceName is nullT addAsResource(java.lang.Package resourcePackage, java.lang.String resourceName, java.lang.String target) throws java.lang.IllegalArgumentException
ClassLoader used to obtain the resource is up to the implementation.resourcePackage - The package of the resourceresourceName - The name of the resource inside resoucePackagetarget - The target location inside the containerjava.lang.IllegalArgumentException - if resourcePackage is nulljava.lang.IllegalArgumentException - if resourceName is nulljava.lang.IllegalArgumentException - if target is nullT addAsResource(java.lang.Package resourcePackage, java.lang.String resourceName, ArchivePath target) throws java.lang.IllegalArgumentException
ClassLoader used to obtain the resource is up to the implementation.resourcePackage - The package of the resourceresourceName - The name of the resource inside resoucePackagetarget - The target location inside the containerjava.lang.IllegalArgumentException - if resourcePackage is nulljava.lang.IllegalArgumentException - if resourceName is nulljava.lang.IllegalArgumentException - if target is null