Class PickFromListTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
com.carrotsearch.ant.tasks.junit4.PickFromListTask
- All Implemented Interfaces:
Cloneable
public class PickFromListTask
extends org.apache.tools.ant.Task
An ANT task to pick and fix the random seed in advance (for selecting
other derivative values, for example).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classNested value element. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanAllow the property to be undefined as one of the pick choices.private static AtomicIntegerExecution ID used to permute the pick order for lists of identical length and identical seed.private StringName of the property to set.private StringRandom seed to use.private List<PickFromListTask.StringValue> Values to pick from.Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapperFields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Execute the task.voidsetAllowUndefined(boolean allowUndefined) voidsetProperty(String propertyName) voidprivate 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, setTaskTypeMethods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Field Details
-
propertyName
Name of the property to set. -
allowUndefined
private boolean allowUndefinedAllow the property to be undefined as one of the pick choices. -
random
Random seed to use. -
values
Values to pick from. -
executionId
Execution ID used to permute the pick order for lists of identical length and identical seed.
-
-
Constructor Details
-
PickFromListTask
public PickFromListTask()
-
-
Method Details
-
setProperty
-
setAllowUndefined
public void setAllowUndefined(boolean allowUndefined) -
setSeed
-
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.
-