com.combex.e.edoc
Class EComment

java.lang.Object
  |
  +--com.combex.e.edoc.EComment
All Implemented Interfaces:
Marker, PassByConstruction, Serializable

class EComment
extends Object
implements PassByConstruction


Field Summary
private  String myCommentString
          raw text of the comment.
private  List myTagList
          sorted comments with different tags.
private  String myText
          text minus any tags.
private static java.text.BreakIterator sentence
          Sentence instance from the BreakIterator.
(package private) static String[] sentenceTerminators
          The HTML sentence terminators.
 
Fields inherited from interface org.erights.e.elib.serial.PassByConstruction
HONORARY, HONORED_NAMES, serialVersionUID
 
Constructor Summary
(package private) EComment(EDoc holder, String commentString)
          constructor of EComment.
 
Method Summary
(package private)  String commentText()
          Return the text of the comment.
(package private) static String englishLanguageFirstSentence(String s)
          Return the first sentence of a string, where a sentence ends with a period followed be white space.
(package private) static ETag[] firstSentenceTags(EDoc holder, String text)
          Return array of tags for the locale specific first sentence in the text.
(package private) static ETag[] getInlineTags(EDoc holder, String inlinetext)
          Return array of tags with text and inline See Tags for a Doc comment.
(package private) static boolean htmlSentenceTerminatorFound(String str, int index)
          Find out if there is any HTML tag in the given string.
(package private) static int inlineTagImplFound(String inlinetext, int start)
          Recursively search for the string "{@link" or "{@LINK" followed by white space, if found return the index of the text following the white space.
(package private) static String localeSpecificFirstSentence(String s)
           
(package private)  com.sun.javadoc.ParamTag[] paramTags()
          Return param tags in this comment.
private  void parseCommentComponent(EDoc holder, String tagName, int from, int upto)
          Private to the implementation of the constructor.
private  void parseCommentStateMachine(EDoc holder)
          Private to the implementation of the constructor.
(package private)  com.sun.javadoc.SeeTag[] seeTags()
          Return see also tags in this comment.
(package private)  com.sun.javadoc.SerialFieldTag[] serialFieldTags()
          Return serialField tags in this comment.
(package private)  ETag[] tags()
          Return all tags in this comment.
(package private)  ETag[] tags(String tagname)
          Return tags of the specified kind in this comment.
(package private)  EThrowsTag[] throwsTags()
          Return throws tags in this comment.
 String toString()
          Return text for this Doc comment.
private  void warnIfEmpty(EDoc holder, String tagName, String tx)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sentence

private static java.text.BreakIterator sentence
Sentence instance from the BreakIterator.


myCommentString

private final String myCommentString
raw text of the comment.


myTagList

private final List myTagList
sorted comments with different tags.


myText

private String myText
text minus any tags.


sentenceTerminators

static final String[] sentenceTerminators
The HTML sentence terminators.

Constructor Detail

EComment

EComment(EDoc holder,
         String commentString)
constructor of EComment.

Method Detail

warnIfEmpty

private void warnIfEmpty(EDoc holder,
                         String tagName,
                         String tx)

parseCommentStateMachine

private void parseCommentStateMachine(EDoc holder)
Private to the implementation of the constructor. Separates the comment into the text part and zero to N tags. Simple state machine is in one of three states:
 IN_TEXT: parsing the comment text or tag text.
 TAG_NAME: parsing the name of a tag.
 TAG_GAP: skipping through the gap between the tag name and
 the tag text.
 


parseCommentComponent

private void parseCommentComponent(EDoc holder,
                                   String tagName,
                                   int from,
                                   int upto)
Private to the implementation of the constructor. Saves away the last parsed item.


commentText

String commentText()
Return the text of the comment.


tags

ETag[] tags()
Return all tags in this comment.


tags

ETag[] tags(String tagname)
Return tags of the specified kind in this comment.


throwsTags

EThrowsTag[] throwsTags()
Return throws tags in this comment.


paramTags

com.sun.javadoc.ParamTag[] paramTags()
Return param tags in this comment.


seeTags

com.sun.javadoc.SeeTag[] seeTags()
Return see also tags in this comment.


serialFieldTags

com.sun.javadoc.SerialFieldTag[] serialFieldTags()
Return serialField tags in this comment.


localeSpecificFirstSentence

static String localeSpecificFirstSentence(String s)

englishLanguageFirstSentence

static String englishLanguageFirstSentence(String s)
Return the first sentence of a string, where a sentence ends with a period followed be white space.


htmlSentenceTerminatorFound

static boolean htmlSentenceTerminatorFound(String str,
                                           int index)
Find out if there is any HTML tag in the given string. If found return true else return false.


getInlineTags

static ETag[] getInlineTags(EDoc holder,
                            String inlinetext)
Return array of tags with text and inline See Tags for a Doc comment.


inlineTagImplFound

static int inlineTagImplFound(String inlinetext,
                              int start)
Recursively search for the string "{@link" or "{@LINK" followed by white space, if found return the index of the text following the white space. else return -1.


firstSentenceTags

static ETag[] firstSentenceTags(EDoc holder,
                                String text)
Return array of tags for the locale specific first sentence in the text.


toString

public String toString()
Return text for this Doc comment.

Overrides:
toString in class Object
Returns:
a string representation of the object.


comments?