DBVIEW
org.dbview.utils.args4j.OptionContainer Class Reference
Inheritance diagram for org.dbview.utils.args4j.OptionContainer:
Collaboration diagram for org.dbview.utils.args4j.OptionContainer:

List of all members.

Public Member Functions

Hashtable< String, Boolean > options ()
String toString ()
String[] extractArgvForThisSet (String[] in_argv)
String[] shrink ()

Private Attributes

ArrayList< String > __shrinked_argv = new ArrayList<String>()

Detailed Description

This class is a parent class for all command line options' containers.

Remarks:
See Args4j. The command line options are declared in a class. We call this class the command line options container
Author:
Denis BEURIVE

Definition at line 37 of file OptionContainer.java.


Member Function Documentation

String [] org.dbview.utils.args4j.OptionContainer.extractArgvForThisSet ( String[]  in_argv)

This method extracts the command line arguments that apply to these options, from a given list of arguments.

Remarks:
This method is used to implement a 2 stages command line parsing. Sometimes, it is necessary to extract a part of information from the command line in order to parse the all arguments.
Parameters:
in_argvList of arguments.
Returns:
The method returns the list of command line arguments that applies to this options' container.

Definition at line 106 of file OptionContainer.java.

Referenced by org.dbview.runtime.cli.CliParser.__tryExport().

Hashtable<String, Boolean> org.dbview.utils.args4j.OptionContainer.options ( )

This method returns the list of command line option strings ("-host", "-user", ...). For each command line option string, the list contains a flag that indicates whether the option takes an argument or not.

Returns:
The method returns a hash.
  • Key: The command option string.
  • Value: A boolean value that indicates whether the option takes an argument or not.

Definition at line 54 of file OptionContainer.java.

Referenced by org.dbview.utils.args4j.OptionContainer.extractArgvForThisSet(), and org.dbview.utils.args4j.OptionContainer.toString().

String [] org.dbview.utils.args4j.OptionContainer.shrink ( )

This method returns the list of command line arguments that remains after the command line parsing.

Returns:
The method returns the list of command line arguments that remains after the command line parsing.

Definition at line 148 of file OptionContainer.java.

String org.dbview.utils.args4j.OptionContainer.toString ( )

This method is mainly used for debugging.

Returns:
The method returns a string that represents the container's state.

Definition at line 83 of file OptionContainer.java.


Member Data Documentation

ArrayList<String> org.dbview.utils.args4j.OptionContainer.__shrinked_argv = new ArrayList<String>() [private]

Each time an option is parsed, then the associated command line arguments are removed from the list of command line argument. This attribute contains the remaining arguments in the command line.

Definition at line 43 of file OptionContainer.java.

Referenced by org.dbview.utils.args4j.OptionContainer.extractArgvForThisSet(), and org.dbview.utils.args4j.OptionContainer.shrink().


The documentation for this class was generated from the following file: