Class ArchiveBase<T extends Archive<T>>
java.lang.Object
org.jboss.shrinkwrap.impl.base.ArchiveBase<T>
- All Implemented Interfaces:
Archive<T>, Assignable, ArchiveFormatAssociable, Configurable, Identifiable
- Direct Known Subclasses:
MemoryMapArchiveBase
public abstract class ArchiveBase<T extends Archive<T>>
extends Object
implements Archive<T>, Configurable, ArchiveFormatAssociable, Identifiable
Base implementation of
Archive. Contains support for operations (typically overloaded) that are not specific
to any particular storage implementation, and may be delegated to other forms.- Version:
- $Revision: $
- Author:
- ALR, John Bailey
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedArchiveBase(String name, Configuration configuration) Constructor -
Method Summary
Modifier and TypeMethodDescriptionadd(Archive<?> archive, ArchivePath path, Class<? extends StreamExporter> exporter) add(Asset asset, ArchivePath path, String name) add(NamedAsset namedAsset) addAsDirectories(String... paths) addAsDirectories(ArchivePath... paths) addAsDirectory(String path) <TYPE extends Assignable>
TYPEprotected final TProvides typesafe covariant return of this instancebooleanfilter(Filter<ArchivePath> filter) Exposes the actual class used in casting<X extends Archive<X>>
X<X extends Archive<X>>
XgetAsType(Class<X> type, String path, ArchiveFormat archiveFormat) <X extends Archive<X>>
XgetAsType(Class<X> type, ArchivePath path) <X extends Archive<X>>
XgetAsType(Class<X> type, ArchivePath path, ArchiveFormat archiveFormat) <X extends Archive<X>>
Collection<X> getAsType(Class<X> type, Filter<ArchivePath> filter) <X extends Archive<X>>
Collection<X> getAsType(Class<X> type, Filter<ArchivePath> filter, ArchiveFormat archiveFormat) getId()final StringgetName()inthashCode()merge(Archive<?> source, String path, Filter<ArchivePath> filter) merge(Archive<?> source, ArchivePath path) merge(Archive<?> source, ArchivePath path, Filter<ArchivePath> filter) merge(Archive<?> source, Filter<ArchivePath> filter) move(ArchivePath source, ArchivePath target) voidshallowCopy(Filter<ArchivePath> filter) toString()toString(boolean verbose) voidwriteTo(OutputStream outputStream, Formatter formatter) Methods inherited from interface Archive
add, add, addAsDirectory, addHandlers, contains, contains, delete, delete, get, getContent, getContent
-
Constructor Details
-
ArchiveBase
ConstructorCreates a new Archive with the specified name
- Parameters:
name- Name of the archiveconfiguration- The configuration for this archive- Throws:
IllegalArgumentException- If the name was not specified
-
-
Method Details
-
getArchiveFormat
- Specified by:
getArchiveFormatin interfaceArchiveFormatAssociable- See Also:
-
add
-
add
-
add
-
get
-
getAsType
-
getAsType
-
getAsType
-
getAsType
-
getAsType
public <X extends Archive<X>> X getAsType(Class<X> type, ArchivePath path, ArchiveFormat archiveFormat) -
getAsType
public <X extends Archive<X>> Collection<X> getAsType(Class<X> type, Filter<ArchivePath> filter, ArchiveFormat archiveFormat) -
filter
-
add
-
add
-
addAsDirectory
- Specified by:
addAsDirectoryin interfaceArchive<T extends Archive<T>>- Throws:
IllegalArgumentException- See Also:
-
addAsDirectories
- Specified by:
addAsDirectoriesin interfaceArchive<T extends Archive<T>>- Throws:
IllegalArgumentException- See Also:
-
addAsDirectories
- Specified by:
addAsDirectoriesin interfaceArchive<T extends Archive<T>>- Throws:
IllegalArgumentException- See Also:
-
getName
-
getId
-
setId
- Specified by:
setIdin interfaceIdentifiable- Throws:
IllegalArgumentException
-
merge
-
merge
-
merge
-
merge
public T merge(Archive<?> source, String path, Filter<ArchivePath> filter) throws IllegalArgumentException -
merge
-
shallowCopy
-
shallowCopy
- Specified by:
shallowCopyin interfaceArchive<T extends Archive<T>>- See Also:
-
merge
public T merge(Archive<?> source, ArchivePath path, Filter<ArchivePath> filter) throws IllegalArgumentException -
move
public T move(ArchivePath source, ArchivePath target) throws IllegalArgumentException, IllegalArchivePathException - Specified by:
movein interfaceArchive<T extends Archive<T>>- Throws:
IllegalArgumentExceptionIllegalArchivePathException- See Also:
-
move
public T move(String source, String target) throws IllegalArgumentException, IllegalArchivePathException - Specified by:
movein interfaceArchive<T extends Archive<T>>- Throws:
IllegalArgumentExceptionIllegalArchivePathException- See Also:
-
as
- Specified by:
asin interfaceAssignable- See Also:
-
toString
-
toString
-
toString
-
writeTo
-
hashCode
-
equals
-
getConfiguration
- Specified by:
getConfigurationin interfaceConfigurable- See Also:
-
getActualClass
-
covariantReturn
Provides typesafe covariant return of this instance
-