CommandLineArgumentHelper Class

DEPRECATED Use CommandLineArgumentHelper

com.beasys.commerce.util
CommandLineArgumentHelper Class

public class CommandLineArgumentHelper

    extends Object

Convenience helper for handling command line arguments.


Hierarchy
Object
  CommandLineArgumentHelper

Field Summary

protected static final String
LINE_FEED
String
public static final Object
REGULAR_ARGS
Object
 

Constructor Summary

CommandLineArgumentHelper()

 

Method Summary

protected static CommandLineArgument
getArgument(String aFlag, List args)
Get argument.
protected static String
getUsageText(boolean isRequired, List arguments)
Get usage text.
protected static boolean
isRequired(String aFlag, List args)
Is required.
public static Map
mapArguments(String[] args, List arguments)
Map the arguments.
protected static boolean
requiresFlagValue(String aFlag, List args)
Requires flag value.
public static String
usage(Class aClass, List arguments)
Usage.
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   

Field Detail

LINE_FEED

protected static final String LINE_FEED


REGULAR_ARGS

public static final Object REGULAR_ARGS

 

Constructor Detail

CommandLineArgumentHelper

public CommandLineArgumentHelper()
 

Method Detail

getArgument(String, List) Method

protected static CommandLineArgument getArgument(String aFlag, 
                                                 List args)
Get argument.

Returns

CommandLineArgument

getUsageText(boolean, List) Method

protected static String getUsageText(boolean isRequired, 
                                     List arguments)
Get usage text.

Returns

String

isRequired(String, List) Method

protected static boolean isRequired(String aFlag, 
                                    List args)
Is required.

Returns

boolean

mapArguments(String[], List) Method

public static Map mapArguments(String[] args, 
                               List arguments)
Map the arguments.

Parameters

args
args from
arguments
list of CommandLineArgument(s).

Returns

Map the key is the CommandLineArgument, the value is a List of values for the CommandLineArgument.

requiresFlagValue(String, List) Method

protected static boolean requiresFlagValue(String aFlag, 
                                           List args)
Requires flag value.

Returns

boolean

usage(Class, List) Method

public static String usage(Class aClass, 
                           List arguments)
Usage.

Returns

String