org.objectweb.dsrg.sofa.cushion
Class CommandLineParser

java.lang.Object
  extended by org.objectweb.dsrg.sofa.cushion.CommandLineParser

public class CommandLineParser
extends java.lang.Object

Dedicated to converting commandline parameters to API objects.

Author:
Ondrej Cerny

Nested Class Summary
static class CommandLineParser.Modifier
           
 
Field Summary
static java.lang.String DESC_OPT_VERSIONTAG_SPEC
          Description of optional version or tag specification.
static java.lang.String DESC_STRICT_TAG_SPEC
          Description of obligatory tag specification.
static java.lang.String DESC_STRICT_VERSION_SPEC
          Description of obligatory version specification.
static java.lang.String EXAMPLE_TAG
          Example of tag specification.
static java.lang.String EXAMPLE_VERSION
          Example of version specification.
 
Constructor Summary
CommandLineParser()
           
 
Method Summary
static int parseEntity(java.lang.String[] args, int nameIndex, CommandLineParser.Modifier mod, org.objectweb.dsrg.sofa.tools.api.entity.EntityDescriptorImpl entity)
          Parse entity information.
static int parseEntity(java.lang.String[] args, int nameIndex, org.objectweb.dsrg.sofa.tools.api.entity.EntityDescriptorImpl entity)
          Parse entity information with default modifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DESC_OPT_VERSIONTAG_SPEC

public static final java.lang.String DESC_OPT_VERSIONTAG_SPEC
Description of optional version or tag specification.

See Also:
Constant Field Values

DESC_STRICT_VERSION_SPEC

public static final java.lang.String DESC_STRICT_VERSION_SPEC
Description of obligatory version specification.

See Also:
Constant Field Values

DESC_STRICT_TAG_SPEC

public static final java.lang.String DESC_STRICT_TAG_SPEC
Description of obligatory tag specification.

See Also:
Constant Field Values

EXAMPLE_TAG

public static final java.lang.String EXAMPLE_TAG
Example of tag specification.

See Also:
Constant Field Values

EXAMPLE_VERSION

public static final java.lang.String EXAMPLE_VERSION
Example of version specification.

See Also:
Constant Field Values
Constructor Detail

CommandLineParser

public CommandLineParser()
Method Detail

parseEntity

public static int parseEntity(java.lang.String[] args,
                              int nameIndex,
                              CommandLineParser.Modifier mod,
                              org.objectweb.dsrg.sofa.tools.api.entity.EntityDescriptorImpl entity)
Parse entity information.

Parameters:
args - Array of arguments.
nameIndex - Index of name.
mod - Modifier.
entity - Entity descriptor to be updated.
Returns:
Index of the first unused argument.

parseEntity

public static int parseEntity(java.lang.String[] args,
                              int nameIndex,
                              org.objectweb.dsrg.sofa.tools.api.entity.EntityDescriptorImpl entity)
Parse entity information with default modifier.

Parameters:
args - Array of arguments.
nameIndex - Index of name.
entity - Entity descriptor to be updated.
Returns:
Index of the last used argument.