java.lang.Cloneablepublic class PropertyCopy extends AbstractPropertySetterTask
Usage: Task declaration in the project:<taskdef name="propertycopy" classname="net.sf.antcontrib.property.PropertyCopy" />Call Syntax:<propertycopy name="propname" from="copyfrom" (silent="true|false")? />Attributes: name --> The name of the property you wish to set with the value from --> The name of the property you wish to copy the value from silent --> Do you want to suppress the error if the "from" property does not exist, and just not set the property "name". Default is false. Example: <property name="org" value="MyOrg" /> <property name="org.MyOrg.DisplayName" value="My Organiziation" /> <propertycopy name="displayName" from="org.${org}.DisplayName" /> <echo message="${displayName}" />
| Constructor | Description |
|---|---|
PropertyCopy() |
Default Constructor
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
execute() |
|
void |
setFrom(java.lang.String from) |
|
void |
setName(java.lang.String name) |
|
void |
setSilent(boolean silent) |
|
protected void |
validate() |
setOverride, setProperty, setPropertyValueequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclone, getDescription, getLocation, getProject, setDescription, setLocation, setProjectbindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypepublic void setName(java.lang.String name)
public void setFrom(java.lang.String from)
public void setSilent(boolean silent)
protected void validate()
validate in class AbstractPropertySetterTaskpublic void execute()
throws org.apache.tools.ant.BuildException
execute in class org.apache.tools.ant.Taskorg.apache.tools.ant.BuildException