Class HtmlDoclet


  • public class HtmlDoclet
    extends MemberDoclet
    Generates HTML pages for display in a function browser.
    Since:
    1 Sep 2004
    Author:
    Mark Taylor (Starlink)
    • Constructor Summary

      Constructors 
      Constructor Description
      HtmlDoclet​(com.sun.javadoc.RootDoc root)
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.io.File classDocFile​(java.io.File baseDir, com.sun.javadoc.ClassDoc clazz)
      Returns the file used to store documentation about a class.
      protected void endClass()
      End output of documentation for the most recently started class.
      protected void endMember()
      End output of the most recently started member.
      static java.io.File fieldDocFile​(java.io.File baseDir, com.sun.javadoc.FieldDoc field)
      Returns the file used to store documentation about a field.
      static java.io.File methodDocFile​(java.io.File baseDir, com.sun.javadoc.MethodDoc method)
      Returns the file used to store documentation about a method.
      static int optionLength​(java.lang.String option)
      Define permitted command-line flags.
      protected void outDescription​(java.lang.String descrip)
      Output a description item.
      protected void outExamples​(java.lang.String[] examples)
      Output examples of the current documentandum (presumably a method).
      protected void outItem​(java.lang.String name, java.lang.String val)
      Output an item to the current documentandum (class/member).
      protected void outParameters​(com.sun.javadoc.Parameter[] params, java.lang.String[] comments, boolean isVararg)
      Output parameters to the current documentandum (presumably a method).
      protected void outReturn​(com.sun.javadoc.Type rtype, java.lang.String rdesc)
      Output return value for the current method.
      protected void outSees​(com.sun.javadoc.SeeTag[] seeTags)
      Output any See tags from the current documentandum.
      static boolean start​(com.sun.javadoc.RootDoc root)
      Begin processing document.
      protected void startClass​(com.sun.javadoc.ClassDoc clazz)
      Begin output of documentation for a given class.
      protected void startMember​(com.sun.javadoc.MemberDoc mem, java.lang.String memType, java.lang.String memName)
      Begin output of documentation for a given class member (field or method).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HtmlDoclet

        public HtmlDoclet​(com.sun.javadoc.RootDoc root)
                   throws java.io.IOException
        Constructor.
        Throws:
        java.io.IOException
    • Method Detail

      • start

        public static boolean start​(com.sun.javadoc.RootDoc root)
                             throws java.io.IOException
        Begin processing document. This method is part of the Doclet public interface.
        Throws:
        java.io.IOException
      • optionLength

        public static int optionLength​(java.lang.String option)
        Define permitted command-line flags. This method is part of the Doclet public interface.
      • startClass

        protected void startClass​(com.sun.javadoc.ClassDoc clazz)
                           throws java.io.IOException
        Description copied from class: MemberDoclet
        Begin output of documentation for a given class. Subsequent calls to outItem refer to this.
        Specified by:
        startClass in class MemberDoclet
        Parameters:
        clazz - class to document
        Throws:
        java.io.IOException
      • endClass

        protected void endClass()
                         throws java.io.IOException
        Description copied from class: MemberDoclet
        End output of documentation for the most recently started class.
        Specified by:
        endClass in class MemberDoclet
        Throws:
        java.io.IOException
      • startMember

        protected void startMember​(com.sun.javadoc.MemberDoc mem,
                                   java.lang.String memType,
                                   java.lang.String memName)
                            throws java.io.IOException
        Description copied from class: MemberDoclet
        Begin output of documentation for a given class member (field or method). Subsequent calls to outItem etc refer to this.
        Specified by:
        startMember in class MemberDoclet
        Parameters:
        mem - class member
        memType - some user-viewable (that is not necessarily using technical terms) description of what kind of member it is
        memName - some user-viewable label for the member
        Throws:
        java.io.IOException
      • endMember

        protected void endMember()
                          throws java.io.IOException
        Description copied from class: MemberDoclet
        End output of the most recently started member.
        Specified by:
        endMember in class MemberDoclet
        Throws:
        java.io.IOException
      • outItem

        protected void outItem​(java.lang.String name,
                               java.lang.String val)
                        throws java.io.IOException
        Description copied from class: MemberDoclet
        Output an item to the current documentandum (class/member).
        Specified by:
        outItem in class MemberDoclet
        Parameters:
        name - item title
        val - item content (HTML text)
        Throws:
        java.io.IOException
      • outParameters

        protected void outParameters​(com.sun.javadoc.Parameter[] params,
                                     java.lang.String[] comments,
                                     boolean isVararg)
                              throws java.io.IOException
        Description copied from class: MemberDoclet
        Output parameters to the current documentandum (presumably a method).
        Specified by:
        outParameters in class MemberDoclet
        Parameters:
        params - array of Parameter objects
        comments - array of comment strings matching params; if there's no comment, the element may be null
        isVararg - true if the method is known to have its final formal argument declared with variable length
        Throws:
        java.io.IOException
      • outReturn

        protected void outReturn​(com.sun.javadoc.Type rtype,
                                 java.lang.String rdesc)
                          throws java.io.IOException
        Description copied from class: MemberDoclet
        Output return value for the current method.
        Specified by:
        outReturn in class MemberDoclet
        Parameters:
        rtype - type of return value
        rdesc - text of return value description (may be null)
        Throws:
        java.io.IOException
      • outDescription

        protected void outDescription​(java.lang.String descrip)
                               throws java.io.IOException
        Description copied from class: MemberDoclet
        Output a description item.
        Specified by:
        outDescription in class MemberDoclet
        Parameters:
        descrip - description string
        Throws:
        java.io.IOException
      • outExamples

        protected void outExamples​(java.lang.String[] examples)
                            throws java.io.IOException
        Description copied from class: MemberDoclet
        Output examples of the current documentandum (presumably a method).
        Specified by:
        outExamples in class MemberDoclet
        Parameters:
        examples - array of strings each representing an example
        Throws:
        java.io.IOException
      • outSees

        protected void outSees​(com.sun.javadoc.SeeTag[] seeTags)
                        throws java.io.IOException
        Description copied from class: MemberDoclet
        Output any See tags from the current documentandum. This only includes explicit @see tags, not @links.
        Specified by:
        outSees in class MemberDoclet
        Throws:
        java.io.IOException
        See Also:
        contents
      • classDocFile

        public static java.io.File classDocFile​(java.io.File baseDir,
                                                com.sun.javadoc.ClassDoc clazz)
        Returns the file used to store documentation about a class.
        Parameters:
        baseDir - root of output fileset
        clazz - class specification
        Returns:
        location for storing documentation text
      • fieldDocFile

        public static java.io.File fieldDocFile​(java.io.File baseDir,
                                                com.sun.javadoc.FieldDoc field)
        Returns the file used to store documentation about a field.
        Parameters:
        baseDir - root of output fileset
        field - field specification
        Returns:
        location for storing documentation text
      • methodDocFile

        public static java.io.File methodDocFile​(java.io.File baseDir,
                                                 com.sun.javadoc.MethodDoc method)
        Returns the file used to store documentation about a method.
        Parameters:
        baseDir - root of output fileset
        method - method specification
        Returns:
        location for storing documentation text