public class ContainerSpecification
extends java.lang.Object
implements org.pfsw.bif.lifecycle.IReleasable
Constructor and Description |
---|
ContainerSpecification(java.lang.String containerFullName)
Initialize the new instance with a full name of the container.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close underlying file (e.g.
|
protected FileUtil |
fileUtil() |
java.lang.String |
getClassesFolderName()
Returns the name of sub-folder in which class files of this container
can be found.
|
protected org.pfsw.file.ClasspathElement |
getClasspathElement() |
ContainerNames |
getContainerNames() |
ContainerType |
getContainerType() |
java.lang.String |
getDisplayName() |
org.pfsw.file.FileInfo |
getFileInfo(java.lang.String classFileName) |
java.lang.String |
getFullContainerName() |
BundleContainerSpecification |
getParentBundleSpec()
returns the optional parent bundle specification.
|
java.lang.String |
getPhysicalName()
Returns the name of the container's physical representation on
the file system.
|
java.lang.String |
getQualifiedContainerName() |
java.lang.String |
getSimpleContainerName() |
IStringChecker |
getSubDirExcludeFilter()
Returns a filter for (relative) sub directory paths that should be
excluded from this container's class and resource files analysis.
|
boolean |
isArchive()
Returns true if the container is actually an archive.
|
boolean |
isDirectory()
Returns true if the container is actually a directory.
|
boolean |
isEmbedded()
Returns whether or not this container specification is embedded in
another (bundle) container specification.
|
boolean |
isMetaData()
Returns true if this element specifies containers and their content by
meta data rather than defining the location of binary class files.
|
boolean |
isPhysicalArchive()
Returns true if the container's current physical file system representation
is an archive.
|
boolean |
isPhysicalDirectory()
Returns true if the container's current physical file system representation
is a directory.
|
boolean |
isValid() |
java.io.InputStream |
open(java.lang.String classFileName) |
java.io.InputStream |
openContainedFile(java.lang.String fileName) |
void |
release()
This method must be called when the specification's underlying resources
are not needed anymore and therefore can be released.
|
protected void |
setClasspathElement(org.pfsw.file.ClasspathElement classpathElement) |
void |
setContainerType(ContainerType containerType) |
void |
setFileRepresentation(java.io.File aFile)
Sets the given file/folder as physical location in the file system.
|
protected StringUtil |
str() |
java.lang.String |
toString() |
public ContainerSpecification(java.lang.String containerFullName)
public java.lang.String getFullContainerName()
public java.lang.String getPhysicalName()
public java.lang.String getSimpleContainerName()
public java.lang.String getQualifiedContainerName()
public java.lang.String getDisplayName()
public java.io.InputStream open(java.lang.String classFileName) throws java.io.IOException
java.io.IOException
public java.io.InputStream openContainedFile(java.lang.String fileName) throws java.io.IOException
java.io.IOException
public void close()
public org.pfsw.file.FileInfo getFileInfo(java.lang.String classFileName)
public boolean isValid()
public boolean isMetaData()
public boolean isArchive()
isPhysicalArchive()
public boolean isDirectory()
public boolean isPhysicalArchive()
isArchive()
,
isPhysicalDirectory()
public boolean isPhysicalDirectory()
isArchive()
,
isPhysicalArchive()
,
isDirectory()
public boolean isEmbedded()
public BundleContainerSpecification getParentBundleSpec()
public void release()
release
in interface org.pfsw.bif.lifecycle.IReleasable
public ContainerType getContainerType()
public ContainerNames getContainerNames()
public void setFileRepresentation(java.io.File aFile)
public java.lang.String getClassesFolderName()
public IStringChecker getSubDirExcludeFilter()
This default implementation returns an exclude filter that matches
no given directory path. That is, no sub directory will be excluded.
Subclasses must override this method in order to exclude one or more
sub directories.
protected org.pfsw.file.ClasspathElement getClasspathElement()
protected void setClasspathElement(org.pfsw.file.ClasspathElement classpathElement)
public void setContainerType(ContainerType containerType)
public java.lang.String toString()
toString
in class java.lang.Object
protected FileUtil fileUtil()
protected StringUtil str()