dsto.dfc.commandline
Class PropertyParser

java.lang.Object
  extended by dsto.dfc.commandline.PropertyParser

public final class PropertyParser
extends Object

Parser for "-Dproperty=value" command line arguments that emulates the processing that the "java" command does. This is useful for allowing -D options in the application's argument list when modifying the command that launched the VM isn't possible.

Author:
Matthew Phillips

Method Summary
static String[] parseOptions(String[] args)
          Parse the "-Dproperty=value" arguments from a list of arguments into the system property set (ie System.getProperties ()).
static String[] parseOptions(String[] args, Properties properties)
          Parse the "-Dproperty=value" arguments from a list of arguments into a property set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

parseOptions

public static String[] parseOptions(String[] args)
Parse the "-Dproperty=value" arguments from a list of arguments into the system property set (ie System.getProperties ()).

Parameters:
args - The arguments.
Returns:
The arguments that aren't -D switches.
See Also:
parseOptions(String[], Properties)

parseOptions

public static String[] parseOptions(String[] args,
                                    Properties properties)
Parse the "-Dproperty=value" arguments from a list of arguments into a property set.

Parameters:
args - The arguments.
properties - The property set to modify.
Returns:
The arguments that aren't -D switches.


Copyright © 2008 Commonwealth of Australia