org.schmant.task.lang
Class ClosureParameters

java.lang.Object
  extended by org.schmant.task.lang.ClosureParameters

public final class ClosureParameters
extends Object

This configuration object is passed to a closure run by the closure task that has one or several source properties and/or the target property set. (If neither of the properties are set, the closure is called without an argument.)

Since:
1.1
Author:
Karl Gustafsson

Method Summary
 OverwriteStrategy getOverwriteStrategy()
          Get the overwrite strategy.
 RelativeLocation getRelativeToBase()
          This property is set with the task's source's location relative to a base location if the task is run within a recursive task.
 Object getSource()
          Get the first item of the source list, or null if no sources are set.
 List<Object> getSources()
          Get a list containing all sources in the order that they were added to the task factory.
 Object getTarget()
          Get the target, or null if no target is set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSources

public List<Object> getSources()
Get a list containing all sources in the order that they were added to the task factory.

Returns:
A list containing all sources. If there are no sources set, this list is empty.

getSource

public Object getSource()
Get the first item of the source list, or null if no sources are set.

Returns:
The first item of the source list, or null if no sources are set.

getRelativeToBase

public RelativeLocation getRelativeToBase()
This property is set with the task's source's location relative to a base location if the task is run within a recursive task. The base location is the location of the source of the recursive task.

If the SourceConfigurable (this object) is an action task factory that is used in a recursive action task, the recursive action task sets this property for each created task.

Returns:
The source's location relative to the base location.

getTarget

public Object getTarget()
Get the target, or null if no target is set.

Returns:
The target, or null if no target is set.

getOverwriteStrategy

public OverwriteStrategy getOverwriteStrategy()
Get the overwrite strategy.

Returns:
The overwrite strategy.