Class ScriptletJavadoc

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

    public class ScriptletJavadoc
    extends Javadoc
    Generates Javadoc comments for an AbstractScriptlet. Can automatically update the comments if they're surrounded by the FLOW_STARTTAG and FLOW_ENDTAG (the indention is determined via the FLOW_STARTTAG).

    In addition to the flow tags, one can also place the tags ACCEPTS_STARTTAG/ACCEPTS_ENDTAG and GENERATES_STARTTAG/GENERATES_ENDTAG in the Javadoc. These tags don't add blocks of comments, but just a single classname. 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.
     
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    DESCRIPTION_STARTTAG, DESCRIPTION_ENDTAG, PARAMETERS_STARTTAG, PARAMETERS_ENDTAG, Serialized Form
    • Field Detail

      • ACTION_STARTTAG

        public static final String ACTION_STARTTAG
        the start comment tag for inserting the generated Javadoc ("action").
        See Also:
        Constant Field Values
      • ACTION_ENDTAG

        public static final String ACTION_ENDTAG
        the end comment tag for inserting the generated Javadoc ("action").
        See Also:
        Constant Field Values
      • DESCRIPTION_STARTTAG

        public static final String DESCRIPTION_STARTTAG
        the start comment tag for inserting the generated Javadoc ("description").
        See Also:
        Constant Field Values
      • DESCRIPTION_ENDTAG

        public static final String DESCRIPTION_ENDTAG
        the end comment tag for inserting the generated Javadoc ("description").
        See Also:
        Constant Field Values
      • PARAMETERS_STARTTAG

        public static final String PARAMETERS_STARTTAG
        the start comment tag for inserting the generated Javadoc ("parameters").
        See Also:
        Constant Field Values
      • PARAMETERS_ENDTAG

        public static final String PARAMETERS_ENDTAG
        the end comment tag for inserting the generated Javadoc ("parameters").
        See Also:
        Constant Field Values
    • Constructor Detail

      • ScriptletJavadoc

        public ScriptletJavadoc()
    • Method Detail

      • initialize

        protected void initialize()
        Initializes the members.
        Overrides:
        initialize in class 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
        Parameters:
        index - the index in the start/end tag array
        Returns:
        the generated Javadoc
        Throws:
        Exception - in case the generation fails
      • main

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