public class PropertyResource extends Resource
MAGIC, UNKNOWN_DATETIME, UNKNOWN_SIZE
description, location, project
Constructor and Description |
---|
PropertyResource()
Default constructor.
|
PropertyResource(Project p,
java.lang.String n)
Construct a new PropertyResource with the specified name.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Override to implement equality with equivalent Resources,
since we are capable of proxying them.
|
java.io.InputStream |
getInputStream()
Get an InputStream for the Resource.
|
java.lang.Object |
getObjectValue()
Get the Object value of this PropertyResource.
|
java.io.OutputStream |
getOutputStream()
Get an OutputStream for the Resource.
|
protected Resource |
getReferencedOrProxied()
Get the referenced or proxied Resource, if applicable.
|
long |
getSize()
Get the size of this Resource.
|
java.lang.String |
getValue()
Get the value of this PropertyResource.
|
int |
hashCode()
Get the hash code for this Resource.
|
boolean |
isExists()
Find out whether this Resource exists.
|
protected boolean |
isReferenceOrProxy()
Learn whether this PropertyResource either refers to another Resource
or proxies another Resource due to its object property value being said Resource.
|
java.lang.String |
toString()
Get the string representation of this Resource.
|
as, clone, compareTo, getLastModified, getMagicNumber, getName, isDirectory, isFilesystemOnly, iterator, setDirectory, setExists, setLastModified, setName, setRefid, setSize, size, toLongString
checkAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, tooManyAttributes
getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
public PropertyResource()
public PropertyResource(Project p, java.lang.String n)
p
- the project to use.n
- the String name of this PropertyResource (Ant property name/key).public java.lang.String getValue()
public java.lang.Object getObjectValue()
public boolean isExists()
public long getSize()
public boolean equals(java.lang.Object o)
public int hashCode()
public java.lang.String toString()
public java.io.InputStream getInputStream() throws java.io.IOException
getInputStream
in class Resource
java.io.IOException
- if unable to provide the content of this
Resource as a stream.java.lang.UnsupportedOperationException
- if InputStreams are not
supported for this Resource type.public java.io.OutputStream getOutputStream() throws java.io.IOException
getOutputStream
in class Resource
java.io.IOException
- if unable to provide the content of this
Resource as a stream.java.lang.UnsupportedOperationException
- if OutputStreams are not
supported for this Resource type.protected boolean isReferenceOrProxy()
protected Resource getReferencedOrProxied()
java.lang.IllegalStateException
- if this PropertyResource neither proxies nor
references another Resource.