XDC - v. 0.6.1

net.sf.xdc.processing
Class XdcOptions

java.lang.Object
  extended byorg.apache.commons.cli.Options
      extended bynet.sf.xdc.processing.XdcOptions

public class XdcOptions
extends org.apache.commons.cli.Options

This class is responsible for setting up all available command line options for the XDC tool. It implements the Singleton design pattern.

Since:
0.5
Version:
0.5
Author:
Jens Voß

Method Summary
 org.apache.commons.cli.Option getOption(java.lang.String opt)
          This method retrieves an available XDC option by its name.
 java.util.Properties getOptionProperties(org.apache.commons.cli.CommandLine line)
          This method is used to convert all available XDC options for which a value has been set on the command line into a Properties object.
static XdcOptions getXdcOptions()
          Static getter method for the (single) instance of the XdcOptions class.
 boolean hasOption(java.lang.String opt)
          This method determines whether an option with a certain name is available.
 
Methods inherited from class org.apache.commons.cli.Options
addOption, addOption, addOption, addOptionGroup, getOptionGroup, getOptions, getRequiredOptions, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getXdcOptions

public static XdcOptions getXdcOptions()
Static getter method for the (single) instance of the XdcOptions class.

Returns:
The instance of the XdcOptions class.

getOption

public org.apache.commons.cli.Option getOption(java.lang.String opt)
This method retrieves an available XDC option by its name. Unlike its super method, it is case-insensitive.

Parameters:
opt - The name of the XDC command line option to be retrieved (case-insensitive)
Returns:
The XDC command line option with the specified name

hasOption

public boolean hasOption(java.lang.String opt)
This method determines whether an option with a certain name is available. Unlike its super method, this method is case-insensitive.

Parameters:
opt - The name of the XDC command line option in question
Returns:
true if the XDC command line option with the specified name is available; false otherwise

getOptionProperties

public java.util.Properties getOptionProperties(org.apache.commons.cli.CommandLine line)
This method is used to convert all available XDC options for which a value has been set on the command line into a Properties object. Only those options for which XdcOption.isXslParam() is true are included in the return value.

Parameters:
line - The command line object which may or may not specify values for the available XDC options
Returns:
A Properties object which contains key-value pairs for all available XDC options which have been set on the command line and whose XdcOption.isXslParam() method returns true

XDC - v. 0.6.1