|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.types.DataType
org.apache.tools.ant.types.Resource
org.apache.tools.ant.types.resources.ArchiveResource
public abstract class ArchiveResource
A Resource representation of an entry inside an archive.
| Field Summary |
|---|
| Fields inherited from class org.apache.tools.ant.types.Resource |
|---|
MAGIC, UNKNOWN_DATETIME, UNKNOWN_SIZE |
| Fields inherited from class org.apache.tools.ant.types.DataType |
|---|
checked, ref |
| Fields inherited from class org.apache.tools.ant.ProjectComponent |
|---|
description, location, project |
| Constructor Summary | |
|---|---|
protected |
ArchiveResource()
Default constructor. |
protected |
ArchiveResource(java.io.File a)
Construct a ArchiveResource representing the specified entry in the specified archive. |
protected |
ArchiveResource(java.io.File a,
boolean withEntry)
Construct a ArchiveResource representing the specified entry in the specified archive. |
protected |
ArchiveResource(Resource a,
boolean withEntry)
Construct a ArchiveResource representing the specified entry in the specified archive. |
| Method Summary | |
|---|---|
void |
addConfigured(ResourceCollection a)
Sets the archive that holds this as a single element Resource collection. |
protected void |
checkEntry()
Validate settings and ensure that the represented "archive entry" has been established. |
int |
compareTo(Resource another)
Compare this ArchiveResource to another Resource. |
protected void |
dieOnCircularReference(java.util.Stack<java.lang.Object> stk,
Project p)
Check to see whether any DataType we hold references to is included in the Stack (which holds all DataType instances that directly or indirectly reference this instance, including this instance itself). |
boolean |
equals(java.lang.Object another)
Compare another Object to this ArchiveResource for equality. |
protected abstract void |
fetchEntry()
Fetch information from the named entry inside the archive. |
Resource |
getArchive()
Get the archive that holds this Resource. |
long |
getLastModified()
Get the last modified date of this Resource. |
int |
getMode()
Get the file or dir mode for this Resource. |
long |
getSize()
Get the size of this Resource. |
int |
hashCode()
Get the hash code for this Resource. |
boolean |
isDirectory()
Learn whether this Resource represents a directory. |
boolean |
isExists()
Find out whether this Resource represents an existing Resource. |
void |
setArchive(java.io.File a)
Set the archive that holds this Resource. |
void |
setMode(int mode)
Sets the file or dir mode for this resource. |
void |
setRefid(Reference r)
Overrides the super version. |
java.lang.String |
toString()
Format this Resource as a String. |
| Methods inherited from class org.apache.tools.ant.types.Resource |
|---|
as, clone, getInputStream, getMagicNumber, getName, getOutputStream, isFilesystemOnly, iterator, setDirectory, setExists, setLastModified, setName, setSize, size, toLongString |
| Methods inherited from class org.apache.tools.ant.types.DataType |
|---|
checkAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, tooManyAttributes |
| Methods inherited from class org.apache.tools.ant.ProjectComponent |
|---|
getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected ArchiveResource()
protected ArchiveResource(java.io.File a)
a - the archive as File.
protected ArchiveResource(java.io.File a,
boolean withEntry)
a - the archive as File.withEntry - if the entry has been specified.
protected ArchiveResource(Resource a,
boolean withEntry)
a - the archive as Resource.withEntry - if the entry has been specified.| Method Detail |
|---|
public void setArchive(java.io.File a)
a - the archive as a File.public void setMode(int mode)
mode - integer representation of Unix permission mask.public void addConfigured(ResourceCollection a)
a - the archive as a single element Resource collection.public Resource getArchive()
public long getLastModified()
getLastModified in class Resourcepublic long getSize()
getSize in class Resourcepublic boolean isDirectory()
isDirectory in class Resourcepublic boolean isExists()
isExists in class Resourcepublic int getMode()
public void setRefid(Reference r)
setRefid in class Resourcer - the Reference to set.public int compareTo(Resource another)
compareTo in interface java.lang.Comparable<Resource>compareTo in class Resourceanother - the other Resource against which to compare.
public boolean equals(java.lang.Object another)
equals in class Resourceanother - the other Object to compare.
public int hashCode()
hashCode in class Resourcepublic java.lang.String toString()
toString in class Resource
protected final void checkEntry()
throws BuildException
BuildExceptionprotected abstract void fetchEntry()
protected void dieOnCircularReference(java.util.Stack<java.lang.Object> stk,
Project p)
If one is included, throw a BuildException created by circularReference.
This implementation is appropriate only for a DataType that cannot hold other DataTypes as children.
The general contract of this method is that it shouldn't do
anything if is true and
set it to true on exit.checked
dieOnCircularReference in class DataTypestk - the stack of references to check.p - the project to use to dereference the references.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||