Class PickFromListTask
- java.lang.Object
-
- org.apache.tools.ant.ProjectComponent
-
- org.apache.tools.ant.Task
-
- com.carrotsearch.ant.tasks.junit4.PickFromListTask
-
- All Implemented Interfaces:
java.lang.Cloneable
public class PickFromListTask extends org.apache.tools.ant.TaskAn ANT task to pick and fix the random seed in advance (for selecting other derivative values, for example).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPickFromListTask.StringValueNested value element.
-
Field Summary
Fields Modifier and Type Field Description private booleanallowUndefinedAllow the property to be undefined as one of the pick choices.private static java.util.concurrent.atomic.AtomicIntegerexecutionIdExecution ID used to permute the pick order for lists of identical length and identical seed.private java.lang.StringpropertyNameName of the property to set.private java.lang.StringrandomRandom seed to use.private java.util.List<PickFromListTask.StringValue>valuesValues to pick from.
-
Constructor Summary
Constructors Constructor Description PickFromListTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PickFromListTask.StringValuecreateValue()voidexecute()Execute the task.voidsetAllowUndefined(boolean allowUndefined)voidsetProperty(java.lang.String propertyName)voidsetSeed(java.lang.String randomSeed)private voidvalidate()Validate arguments and state.-
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
-
-
-
-
Field Detail
-
propertyName
private java.lang.String propertyName
Name of the property to set.
-
allowUndefined
private boolean allowUndefined
Allow the property to be undefined as one of the pick choices.
-
random
private java.lang.String random
Random seed to use.
-
values
private java.util.List<PickFromListTask.StringValue> values
Values to pick from.
-
executionId
private static java.util.concurrent.atomic.AtomicInteger executionId
Execution ID used to permute the pick order for lists of identical length and identical seed.
-
-
Method Detail
-
setProperty
public void setProperty(java.lang.String propertyName)
-
setAllowUndefined
public void setAllowUndefined(boolean allowUndefined)
-
setSeed
public void setSeed(java.lang.String randomSeed)
-
createValue
public PickFromListTask.StringValue createValue()
-
execute
public void execute() throws org.apache.tools.ant.BuildExceptionExecute the task.- Overrides:
executein classorg.apache.tools.ant.Task- Throws:
org.apache.tools.ant.BuildException
-
validate
private void validate()
Validate arguments and state.
-
-