Class OptionHandlerJavadoc

  • All Implemented Interfaces:
    Destroyable, LoggingSupporter, OptionHandler, UserModeSupporter, SizeOfHandler, Serializable

    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:

    -env <java.lang.String> (property: environment)
             The class to use for determining the environment.
             default: adams.core.Environment
    -W <java.lang.String> (property: classname)
             The class to load.
             default: adams.doc.AllJavadoc
    -nostars (property: useStars)
             Controls the use of '*' in the Javadoc.
    -dir <java.lang.String> (property: dir)
             The directory above the package hierarchy of the class.
             default: .
    -silent (property: silent)
             Suppresses printing in the console.
    -noprolog (property: Prolog)
             Controls the 'Valid options are...' prolog in the Javadoc.
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    OPTIONS_STARTTAG, OPTIONS_ENDTAG, OptionHandlerJavadoc, Serialized Form
    • Field Detail


        public static final String OPTIONS_STARTTAG
        the start comment tag for inserting the generated Javadoc.
        See Also:
        Constant Field Values

        public static final String OPTIONS_ENDTAG
        the end comment tag for inserting the generated Javadoc.
        See Also:
        Constant Field Values
      • m_Prolog

        protected boolean m_Prolog
        whether to include the "Valid options..." prolog in the Javadoc.
    • Constructor Detail

      • OptionHandlerJavadoc

        public OptionHandlerJavadoc()
    • Method Detail

      • initialize

        protected void initialize()
        Initializes the members.
        initialize in class Javadoc
      • setProlog

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

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

        public String PrologTipText()
        Returns the tip text for this property.
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • generateJavadoc

        protected String generateJavadoc​(String option)
        Generates valid HTML Javadoc from the given option.
        option - the option to generate Javadoc for
        the generated Javadoc
      • generateJavadoc

        protected String generateJavadoc​(int index)
                                  throws Exception
        generates and returns the Javadoc for the specified start/end tag pair.
        Specified by:
        generateJavadoc in class Javadoc
        index - the index in the start/end tag array
        the generated Javadoc
        Exception - in case the generation fails
      • main

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