Class JDocComment


  • public class JDocComment
    extends java.lang.Object
    A class that "SOMEWHAT" represents a Java Doc Comment.
    Version:
    $Revision$ $Date$
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.StringBuilder _comment
      The internal buffer for this JDocComment
      private java.util.List<JDocDescriptor> _descriptors
      An ordered list of descriptors
    • Constructor Summary

      Constructors 
      Constructor Description
      JDocComment()
      Creates a new JavaDoc Comment
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addDescriptor​(JDocDescriptor jdesc)
      Adds the given JDocDescriptor to this JDocComment
      void appendComment​(java.lang.String comment)
      Appends the comment String to this JDocComment
      java.lang.String getComment()
      Returns the String value of this JDocComment.
      java.util.Enumeration<JDocDescriptor> getDescriptors()
      Returns an enumeration of the parameters of this JDocComment
      int getLength()
      Returns the length of the comment
      JDocDescriptor getParamDescriptor​(java.lang.String name)
      Returns the Parameter Descriptor associated with the given name
      void print​(JSourceWriter jsw)
      prints this JavaDoc comment using the given JSourceWriter
      void setComment​(java.lang.String comment)
      Sets the comment String of this JDocComment
      java.lang.String toString()
      Returns the String representation of this Java Doc Comment
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • _descriptors

        private java.util.List<JDocDescriptor> _descriptors
        An ordered list of descriptors
      • _comment

        private java.lang.StringBuilder _comment
        The internal buffer for this JDocComment
    • Constructor Detail

      • JDocComment

        public JDocComment()
        Creates a new JavaDoc Comment
    • Method Detail

      • addDescriptor

        public void addDescriptor​(JDocDescriptor jdesc)
        Adds the given JDocDescriptor to this JDocComment
        Parameters:
        jdesc - the JDocDescriptor to add
      • appendComment

        public void appendComment​(java.lang.String comment)
        Appends the comment String to this JDocComment
        Parameters:
        comment - the comment to append
      • getComment

        public java.lang.String getComment()
        Returns the String value of this JDocComment.
        Returns:
        the String value of the JDocComment.
      • getDescriptors

        public java.util.Enumeration<JDocDescriptor> getDescriptors()
        Returns an enumeration of the parameters of this JDocComment
        Returns:
        an enumeration of the parameters of this JDocComment
      • getLength

        public int getLength()
        Returns the length of the comment
        Returns:
        the length of the comment
      • getParamDescriptor

        public JDocDescriptor getParamDescriptor​(java.lang.String name)
        Returns the Parameter Descriptor associated with the given name
        Parameters:
        name - the name of the parameter
        Returns:
        the Parameter Descriptor associated with the given name
      • print

        public void print​(JSourceWriter jsw)
        prints this JavaDoc comment using the given JSourceWriter
        Parameters:
        jsw - the JSourceWriter to print to
      • setComment

        public void setComment​(java.lang.String comment)
        Sets the comment String of this JDocComment
        Parameters:
        comment - the comment String of this JDocComment
      • toString

        public java.lang.String toString()
        Returns the String representation of this Java Doc Comment
        Overrides:
        toString in class java.lang.Object
        Returns:
        the String representation of this Java Doc Comment