org.ops4j.pax.runner
Class CommandLineImpl

java.lang.Object
  extended by org.ops4j.pax.runner.CommandLineImpl
All Implemented Interfaces:
CommandLine

public class CommandLineImpl
extends java.lang.Object
implements CommandLine

Default implementation of Command Line.

Since:
August 26, 2007
Author:
Alin Dreghiciu

Field Summary
static java.util.regex.Pattern OPTION_PATTERN
          Option pattern.
 
Fields inherited from interface org.ops4j.pax.runner.CommandLine
OPTION_CONFIG, OPTION_HANDLERS, OPTION_LOG, OPTION_PLATFORM, OPTION_PLATFORM_VERSION, OPTION_SCANNERS, OPTION_SERVICES
 
Constructor Summary
CommandLineImpl(java.lang.String... args)
          Creates a new Command line by parsing every argument into an option or argument.
 
Method Summary
 java.util.List<java.lang.String> getArguments()
          Returns the list of all arguments.
 java.lang.String getOption(java.lang.String key)
          Returns the value of an option by key.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OPTION_PATTERN

public static final java.util.regex.Pattern OPTION_PATTERN
Option pattern.

Constructor Detail

CommandLineImpl

public CommandLineImpl(java.lang.String... args)
Creates a new Command line by parsing every argument into an option or argument.

Parameters:
args - an array of arguments to be parsed
Method Detail

getOption

public java.lang.String getOption(java.lang.String key)
Returns the value of an option by key. If option is not defined returns null.

Specified by:
getOption in interface CommandLine
Parameters:
key - option key
Returns:
The option value.

getArguments

public java.util.List<java.lang.String> getArguments()
Returns the list of all arguments.

Specified by:
getArguments in interface CommandLine
Returns:
list of arguments

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object


Copyright © 2008. All Rights Reserved.