com.objectwave.sourceModel
Class CommentElement

java.lang.Object
  |
  +--com.objectwave.sourceModel.CommentElement
All Implemented Interfaces:
ClassElement

public class CommentElement
extends java.lang.Object
implements ClassElement

Holds a meta-model representation of comments.

Version:
1.3
Author:
Dave Hoag

Field Summary
 java.lang.String fullText
           
 
Constructor Summary
CommentElement()
          CommentElement constructor comment.
 
Method Summary
 boolean addDocParam(java.lang.String key, java.lang.String text)
          Add a new param to the first JavaDoc comment.
 boolean containsTag(java.lang.String str)
          Search the list of comment elements for one that may contain this tag.
 void dumpObject()
          dumpObject method comment.
 java.lang.String getBody()
           
 ClassElement[] getChildElements()
          getChildElements method comment.
 boolean getCplusplusStyle()
           
 boolean getCStyle()
           
 java.lang.String getFullText()
           
 java.lang.String getFullTextNoChild()
          getFullTextNoChild method comment.
 boolean getJavaDoc()
          is this comment a javaDoc comment?
 CommentElement getNext()
          There may be a list of comments following each other.
 java.util.Enumeration getTagValue(java.lang.String str)
          Look for the tag in our chain of comments.
 java.lang.String getTheRest()
           
 boolean hasChildElements()
          hasChildElements method comment.
 java.lang.String listEntry()
          the way to display this element in a list box.
protected  void refigure()
          Side effect of changing the 'fullText' of the this.
protected  void refigure(boolean includeTail)
          Side effect of changing the 'fullText' of the this.
 void setBody(java.lang.String aValue)
           
 void setCplusplusStyle(boolean aValue)
          like "//"
 void setCStyle(boolean aValue)
          like "/*"
 boolean setDocParam(java.lang.String key, java.util.Vector text)
          Override what ever was there with this text.
 void setFullText(java.lang.String aValue)
           
 void setJavaDoc(boolean aValue)
           
 void setNext(CommentElement ce)
           
 void setTheRest(java.lang.String newValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fullText

public java.lang.String fullText
Constructor Detail

CommentElement

public CommentElement()
CommentElement constructor comment.

Method Detail

setNext

public void setNext(CommentElement ce)

getNext

public CommentElement getNext()
There may be a list of comments following each other.


addDocParam

public boolean addDocParam(java.lang.String key,
                           java.lang.String text)
Add a new param to the first JavaDoc comment. If there are none, then change this one to be a java doc tag.


containsTag

public boolean containsTag(java.lang.String str)
Search the list of comment elements for one that may contain this tag.


dumpObject

public void dumpObject()
dumpObject method comment.

Specified by:
dumpObject in interface ClassElement

getBody

public java.lang.String getBody()

getChildElements

public ClassElement[] getChildElements()
getChildElements method comment.

Specified by:
getChildElements in interface ClassElement

getCplusplusStyle

public boolean getCplusplusStyle()

getCStyle

public boolean getCStyle()

getFullText

public java.lang.String getFullText()
Specified by:
getFullText in interface ClassElement

getFullTextNoChild

public java.lang.String getFullTextNoChild()
getFullTextNoChild method comment.

Specified by:
getFullTextNoChild in interface ClassElement

getJavaDoc

public boolean getJavaDoc()
is this comment a javaDoc comment?


getTagValue

public java.util.Enumeration getTagValue(java.lang.String str)
Look for the tag in our chain of comments.

Returns:
java.util.Enumeration the value for the first instance of that tag.

getTheRest

public java.lang.String getTheRest()
Returns:
java.lang.String

hasChildElements

public boolean hasChildElements()
hasChildElements method comment.

Specified by:
hasChildElements in interface ClassElement

listEntry

public java.lang.String listEntry()
the way to display this element in a list box.

Specified by:
listEntry in interface ClassElement

refigure

protected void refigure()
Side effect of changing the 'fullText' of the this.


refigure

protected void refigure(boolean includeTail)
Side effect of changing the 'fullText' of the this.


setBody

public void setBody(java.lang.String aValue)

setCplusplusStyle

public void setCplusplusStyle(boolean aValue)
like "//"


setCStyle

public void setCStyle(boolean aValue)
like "/*"


setDocParam

public boolean setDocParam(java.lang.String key,
                           java.util.Vector text)
Override what ever was there with this text.


setFullText

public void setFullText(java.lang.String aValue)
Specified by:
setFullText in interface ClassElement

setJavaDoc

public void setJavaDoc(boolean aValue)

setTheRest

public void setTheRest(java.lang.String newValue)
Parameters:
newValue - java.lang.String