org.codehaus.mojo.cobertura.tasks
Class CommandLineArguments

java.lang.Object
  extended by org.codehaus.mojo.cobertura.tasks.CommandLineArguments

public class CommandLineArguments
extends Object

CommandLineArguments allows for arbitrarily long command line argument lists.

Author:
Joakim Erdfelt

Constructor Summary
CommandLineArguments()
          Construct empty arg set.
 
Method Summary
 void addArg(String arg)
          Append an option.
 void addArg(String arg1, String arg2)
          Append two arguments (e.g.
 List<String> getArgs()
           
 String getCommandsFile()
          Generate the Commands file and return the filename to it.
 Iterator<String> iterator()
           
 void setUseCommandsFile(boolean useCommandsFile)
           
 boolean useCommandsFile()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandLineArguments

public CommandLineArguments()
Construct empty arg set.

Method Detail

addArg

public void addArg(String arg)
Append an option.

Parameters:
arg - the argument.

addArg

public void addArg(String arg1,
                   String arg2)
Append two arguments (e.g. -x y)

Parameters:
arg1 - first arg
arg2 - second arg.

getArgs

public List<String> getArgs()
Returns:
the list of arg strings.

getCommandsFile

public String getCommandsFile()
                       throws IOException
Generate the Commands file and return the filename to it.

Returns:
the commands filename.
Throws:
IOException - error writing the file.

iterator

public Iterator<String> iterator()
Returns:
an iterator over the arg strings.

setUseCommandsFile

public void setUseCommandsFile(boolean useCommandsFile)
Parameters:
useCommandsFile - The useCommandsFile to set.

useCommandsFile

public boolean useCommandsFile()
Returns:
Returns the useCommandsFile.


Copyright © 2005-2014 Codehaus. All Rights Reserved.