bpiwowar.experiments
Class AbstractTask

java.lang.Object
  extended by bpiwowar.experiments.AbstractTask
All Implemented Interfaces:
Task

public abstract class AbstractTask
extends Object
implements Task

An abstract task that takes care of parsing

Author:
Benjamin Piwowarski

Nested Class Summary
static interface AbstractTask.Information
           
 
Constructor Summary
AbstractTask()
           
 
Method Summary
 int execute()
          Execute the task
protected  String getName()
          Returns the name of the task
 Task getParent()
          Get the parent task
 void init(String[] args)
          Initialise the object before running it
 String[] processTrailingArguments(String[] args)
          Process trailing arguments if we have some
 int run()
          Run the experiments with the given arguments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTask

public AbstractTask()
Method Detail

execute

public int execute()
            throws Throwable
Execute the task

Throws:
Throwable

getParent

public Task getParent()
Get the parent task

Returns:

processTrailingArguments

public String[] processTrailingArguments(String[] args)
                                  throws Exception
Process trailing arguments if we have some

Parameters:
args - The arguments
Returns:
The unprocessed trailing arguments
Throws:
Exception

init

public final void init(String[] args)
                throws Exception
Description copied from interface: Task
Initialise the object before running it

Specified by:
init in interface Task
Throws:
Exception

run

public final int run()
              throws Throwable
Description copied from interface: Task
Run the experiments with the given arguments

Specified by:
run in interface Task
Throws:
Throwable

getName

protected String getName()
Returns the name of the task

Returns:
The experiment name annotation, or the class name if there is no such annotation


Copyright © 2013. All Rights Reserved.