org.ops4j.exec
Class CommandLineBuilder

java.lang.Object
  extended by org.ops4j.exec.CommandLineBuilder

public class CommandLineBuilder
extends Object

Provides easy building of command line for a java runtime. TODO add unit tests

Since:
August 25, 2007
Author:
Alin Dreghiciu

Constructor Summary
CommandLineBuilder()
          Creates a new command line builder.
 
Method Summary
 CommandLineBuilder append(String segment)
          Appends a string to command line.
 CommandLineBuilder append(String[] segments)
          Appends an array of strings to command line.
 String[] toArray()
          Returns the command line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandLineBuilder

public CommandLineBuilder()
Creates a new command line builder.

Method Detail

append

public CommandLineBuilder append(String[] segments)
Appends an array of strings to command line.

Parameters:
segments - array to append
Returns:
CommandLineBuilder for fluent api

append

public CommandLineBuilder append(String segment)
Appends a string to command line.

Parameters:
segment - string to append
Returns:
CommandLineBuilder for fluent api

toArray

public String[] toArray()
Returns the command line.

Returns:
command line


Copyright © 2006-2013 OPS4J - Open Participation Software for Java. All Rights Reserved.