AntFetch (Ant Contrib)
Date: 2016-06-25

net.sf.antcontrib.logic

## Class AntFetch

- java.lang.Object
- - org.apache.tools.ant.ProjectComponent
  - - org.apache.tools.ant.Task
    - - org.apache.tools.ant.taskdefs.Ant
      - - net.sf.antcontrib.logic.AntFetch

- All Implemented Interfaces:
    java.lang.Cloneable

      public class AntFetch
      extends org.apache.tools.ant.taskdefs.Ant

  Subclass of CallTarget which allows us to fetch properties which are set in the scope of the called target, and set them in the scope of the calling target. Normally, these properties are thrown away as soon as the called target completes execution.
  Author:
    inger, Dale Anson, danson@germane-software.com

- - ### Property Summary

    - ### Properties inherited from class org.apache.tools.ant.taskdefs.Ant

      `createProperty`

  - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.tools.ant.taskdefs.Ant

      `org.apache.tools.ant.taskdefs.Ant.Reference, org.apache.tools.ant.taskdefs.Ant.TargetElement`

  - ### Field Summary

    - ### Fields inherited from class org.apache.tools.ant.Task

      `target, taskName, taskType, wrapper`

    - ### Fields inherited from class org.apache.tools.ant.ProjectComponent

      `description, location, project`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AntFetch()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `execute()` Do the execution.
    `void` | `setProject(org.apache.tools.ant.Project realProject)`
    `void` | `setReturn(java.lang.String r)` Set the property or properties that are set in the new project to be transfered back to the original project.

    - ### Methods inherited from class org.apache.tools.ant.taskdefs.Ant

      `addConfiguredTarget, addPropertyset, addReference, createProperty, getDefaultBuildFile, getNewProject, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, setAntfile, setDir, setInheritAll, setInheritRefs, setOutput, setTarget, setUseNativeBasedir`

    - ### Methods inherited from class org.apache.tools.ant.Task

      `bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType`

    - ### Methods inherited from class org.apache.tools.ant.ProjectComponent

      `clone, getDescription, getLocation, getProject, setDescription, setLocation`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AntFetch

          public AntFetch()

  - ### Method Detail

    - #### setProject

          public void setProject(org.apache.tools.ant.Project realProject)

      Overrides:
        `setProject` in class `org.apache.tools.ant.ProjectComponent`

    - #### execute

          public void execute()
                       throws org.apache.tools.ant.BuildException

      Do the execution.
      Overrides:
        `execute` in class `org.apache.tools.ant.taskdefs.Ant`
      Throws:
        `org.apache.tools.ant.BuildException` - Description of the Exception

    - #### setReturn

          public void setReturn(java.lang.String r)

      Set the property or properties that are set in the new project to be transfered back to the original project. As with all properties, if the property already exists in the original project, it will not be overridden by a different value from the new project.
      Parameters:
        `r` - the name of a property in the new project to set in the original project. This may be a comma separate list of properties.