Package weka.core

Class OptionHandlerJavadoc

java.lang.Object
weka.core.Javadoc
weka.core.OptionHandlerJavadoc
All Implemented Interfaces:
OptionHandler, RevisionHandler

public class OptionHandlerJavadoc extends Javadoc
Generates Javadoc comments from the OptionHandler's options. Can automatically update the option comments if they're surrounded by the OPTIONS_STARTTAG and OPTIONS_ENDTAG (the indention is determined via the OPTIONS_STARTTAG).

Valid options are:

 -W <classname>
  The class to load.
 
 -nostars
  Suppresses the '*' in the Javadoc.
 
 -dir <dir>
  The directory above the package hierarchy of the class.
 
 -silent
  Suppresses printing in the console.
 
 -noprolog
  Suppresses the 'Valid options are...' prolog in the Javadoc.
 
Version:
$Revision: 14293 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
  • Field Details

    • OPTIONS_STARTTAG

      public static final String OPTIONS_STARTTAG
      the start comment tag for inserting the generated Javadoc
      See Also:
    • OPTIONS_ENDTAG

      public static final String OPTIONS_ENDTAG
      the end comment tag for inserting the generated Javadoc
      See Also:
  • Constructor Details

    • OptionHandlerJavadoc

      public OptionHandlerJavadoc()
      default constructor
  • Method Details

    • listOptions

      public Enumeration<Option> listOptions()
      Returns an enumeration describing the available options.
      Specified by:
      listOptions in interface OptionHandler
      Overrides:
      listOptions in class Javadoc
      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
      Overrides:
      setOptions in class Javadoc
      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
      Overrides:
      getOptions in class Javadoc
      Returns:
      an array of strings suitable for passing to setOptions
    • setProlog

      public void setProlog(boolean value)
      sets whether to add the "Valid options are..." prolog
      Parameters:
      value - true if the prolog is to be added
    • getProlog

      public boolean getProlog()
      whether "Valid options are..." prolog is included in the Javadoc
      Returns:
      true if the prolog is printed
    • getRevision

      public String getRevision()
      Returns the revision string.
      Returns:
      the revision
    • main

      public static void main(String[] args)
      Parses the given commandline parameters and generates the Javadoc.
      Parameters:
      args - the commandline parameters for the object