Package weka.core

Class Javadoc

java.lang.Object
weka.core.Javadoc
All Implemented Interfaces:
OptionHandler, RevisionHandler
Direct Known Subclasses:
AllJavadoc, GlobalInfoJavadoc, OptionHandlerJavadoc, TechnicalInformationHandlerJavadoc

public abstract class Javadoc extends Object implements OptionHandler, RevisionHandler
Abstract superclass for classes that generate Javadoc comments and replace the content between certain comment tags.
Version:
$Revision: 11734 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
  • Constructor Details

    • Javadoc

      public Javadoc()
  • 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
    • setUseStars

      public void setUseStars(boolean value)
      sets whether to prefix the Javadoc with "*"
      Parameters:
      value - true if stars are used
    • getUseStars

      public boolean getUseStars()
      whether the Javadoc is prefixed with "*"
      Returns:
      whether stars are used
    • setDir

      public void setDir(String value)
      sets the dir containing the file that is to be updated. It is the dir above the package hierarchy of the class.
      Parameters:
      value - the directory containing the classes
    • getDir

      public String getDir()
      returns the current dir containing the class to update. It is the dir above the package name of the class.
      Returns:
      the current directory
    • setSilent

      public void setSilent(boolean value)
      sets whether to suppress output in the console
      Parameters:
      value - true if output is to be suppressed
    • getSilent

      public boolean getSilent()
      whether output in the console is suppressed
      Returns:
      true if output is suppressed
    • updateJavadoc

      public String updateJavadoc() throws Exception
      generates the Javadoc and returns it applied to the source file if one was provided, otherwise an empty string.
      Returns:
      the generated Javadoc
      Throws:
      Exception - in case the generation fails
    • generate

      public String generate() throws Exception
      generates either the plain Javadoc (if no filename specified) or the updated file (if a filename is specified). The start and end tag for the global info have to be specified in the file in the latter case.
      Returns:
      either the plain Javadoc or the modified file
      Throws:
      Exception - in case the generation fails
    • generateHelp

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