org.xqdoc.conversion
Class XQDocComment

java.lang.Object
  extended by org.xqdoc.conversion.XQDocComment

public class XQDocComment
extends java.lang.Object

This class knows hows to 'parse' through a string of text that consists of a xqDoc Comment block. Longer term, this logic should probably be embedded in the actual xqDoc grammar, but for now it resides here. Perhaps when my experience with ANTLR grows, I will move this logic. The class does assume that a xqDoc comment is separated into 'lines'.

Version:
1.0
Author:
Darin McBeath

Constructor Summary
XQDocComment()
           
 
Method Summary
 void clear()
          Initailize the XQDocComment object for processing of a xqDoc comment block.
 java.lang.StringBuffer getXML()
          Loop through the array of string buffers for the xqDoc comment block and construct a complete comment block.
 void setComment(java.lang.String comment)
          Set the internal buffer with the specified xqDoc comment block.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XQDocComment

public XQDocComment()
Method Detail

clear

public void clear()
Initailize the XQDocComment object for processing of a xqDoc comment block. This includes clearing the various buffers and setting the current comment state to 'unknown'.


setComment

public void setComment(java.lang.String comment)
Set the internal buffer with the specified xqDoc comment block. This method is invoked (via XQDocContext) via the Parser for each xqDoc comment block encountered while parsing the module.

Parameters:
comment - A xqDoc comment block

getXML

public java.lang.StringBuffer getXML()
Loop through the array of string buffers for the xqDoc comment block and construct a complete comment block.

Returns:
The serialized xqDoc XML for the current xqDoc comment block