dsto.dfc.util.plugins
Class PluginOption

java.lang.Object
  extended by dsto.dfc.commandline.Option
      extended by dsto.dfc.util.plugins.PluginOption

public class PluginOption
extends Option

A commmand line option class that enables plugin loading via a "-plugin" (or just "-p") command line switch.

Version:
$Revision$

Field Summary
 
Fields inherited from class dsto.dfc.commandline.Option
value
 
Constructor Summary
PluginOption()
          The no argument constructor uses '-p' or "--plugin" or "-plugin" as the form for the option.
PluginOption(char shortForm, String longForm, boolean wantsValue)
           
 
Method Summary
protected  Object parseValue(String arg)
          Override to extract and convert an option value passed on the command-line
protected  void setValue(String value)
          Set the name of the plugin to load to value, and load the the plugin.
 
Methods inherited from class dsto.dfc.commandline.Option
getValue, getValue, longForm, shortForm, wantsValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginOption

public PluginOption()
The no argument constructor uses '-p' or "--plugin" or "-plugin" as the form for the option.


PluginOption

public PluginOption(char shortForm,
                    String longForm,
                    boolean wantsValue)
Method Detail

parseValue

protected Object parseValue(String arg)
Description copied from class: Option
Override to extract and convert an option value passed on the command-line

Overrides:
parseValue in class Option

setValue

protected void setValue(String value)
Set the name of the plugin to load to value, and load the the plugin.

Overrides:
setValue in class Option
Parameters:
value - the name of the plugin to load and initialise.


Copyright © 2008 Commonwealth of Australia