Package weka.core

# Class ListOptions

java.lang.Object
weka.core.ListOptions

All Implemented Interfaces:
  `CommandlineRunnable`, `OptionHandler`, `RevisionHandler`

public class ListOptions extends Object implements OptionHandler, RevisionHandler, CommandlineRunnable
Lists the options of an OptionHandler

Version:
  $Revision: 12950 $
Author:
  fracpete (fracpete at waikato dot ac dot nz)

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ListOptions()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `generate()`
  generates the options string.
  `String`
  `generateHelp()`
  generates a string to print as help on the console
  `String`
  `getClassname()`
  returns the current classname
  `String[]`
  `getOptions()`
  Gets the current settings of this object.
  `String`
  `getRevision()`
  Returns the revision string.
  `Enumeration<Option>`
  `listOptions()`
  Returns an enumeration describing the available options.
  `static void`
  `main(String[] options)`
  runs the javadoc producer with the given commandline options
  `void`
  `postExecution()`
  Perform any teardown stuff that might need to happen after execution.
  `void`
  `preExecution()`
  Perform any setup stuff that might need to happen before execution.
  `void`
  `run(Object toRun, String[] options)`
  Execute the supplied object.
  `void`
  `setClassname(String value)`
  sets the classname of the class to generate the Javadoc for
  `void`
  `setOptions(String[] options)`
  Parses a given list of options.

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ListOptions

    public ListOptions()

- ## Method Details

  - ### listOptions

    public Enumeration<Option> listOptions()
    Returns an enumeration describing the available options.
    Specified by:
      `listOptions` in interface `OptionHandler`
    Returns:
      an enumeration of all the available options.

  - ### setOptions

    public void setOptions(String[] options) throws Exception
    Parses a given list of options.
    Specified by:
      `setOptions` in interface `OptionHandler`
    Parameters:
      `options` - the list of options as an array of strings
    Throws:
      `Exception` - if an option is not supported

  - ### getOptions

    public String[] getOptions()
    Gets the current settings of this object.
    Specified by:
      `getOptions` in interface `OptionHandler`
    Returns:
      an array of strings suitable for passing to setOptions

  - ### setClassname

    public void setClassname(String value)
    sets the classname of the class to generate the Javadoc for
    Parameters:
      `value` - the new classname

  - ### getClassname

    public String getClassname()
    returns the current classname
    Returns:
      the current classname

  - ### generateHelp

    public String generateHelp()
    generates a string to print as help on the console
    Returns:
      the generated help

  - ### generate

    public String generate() throws Exception
    generates the options string.
    Returns:
      the options string
    Throws:
      `Exception` - in case the generation fails

  - ### getRevision

    public String getRevision()
    Returns the revision string.
    Specified by:
      `getRevision` in interface `RevisionHandler`
    Returns:
      the revision

  - ### main

    public static void main(String[] options)
    runs the javadoc producer with the given commandline options
    Parameters:
      `options` - the commandline options

  - ### preExecution

    public void preExecution() throws Exception
    Description copied from interface: `CommandlineRunnable`
    Perform any setup stuff that might need to happen before execution.
    Specified by:
      `preExecution` in interface `CommandlineRunnable`
    Throws:
      `Exception` - if a problem occurs during setup

  - ### run

    public void run(Object toRun, String[] options) throws Exception
    Description copied from interface: `CommandlineRunnable`
    Execute the supplied object.
    Specified by:
      `run` in interface `CommandlineRunnable`
    Parameters:
      `toRun` - the object to execute
      `options` - any options to pass to the object
    Throws:
      `Exception` - if a problem occurs.

  - ### postExecution

    public void postExecution() throws Exception
    Description copied from interface: `CommandlineRunnable`
    Perform any teardown stuff that might need to happen after execution.
    Specified by:
      `postExecution` in interface `CommandlineRunnable`
    Throws:
      `Exception` - if a problem occurs during teardown