org.eclipse.jdt.internal.formatter
Class FormatJavadocBlock

java.lang.Object
  extended by org.eclipse.jdt.internal.formatter.FormatJavadocNode
      extended by org.eclipse.jdt.internal.formatter.FormatJavadocBlock
All Implemented Interfaces:
JavadocTagConstants, IJavaDocTagConstants

public class FormatJavadocBlock
extends FormatJavadocNode
implements IJavaDocTagConstants

Represents a block in a FormatJavadoc which might be a description or a tag (seeisDescription()).

The block might have a tag, a reference and nodes (see FormatJavadocNode. Each of these elements might be present or not, but at least one of them is.


Field Summary
 
Fields inherited from interface org.eclipse.jdt.internal.formatter.comment.IJavaDocTagConstants
BLOCK_FOOTER, BLOCK_FOOTER_LENGTH, BLOCK_HEADER, BLOCK_HEADER_LENGTH, BLOCK_LINE_PREFIX, BLOCK_LINE_PREFIX_LENGTH, COMMENT_ROOT_TAGS, COMMENT_TAG_PREFIX, JAVADOC_BREAK_TAGS, JAVADOC_BREAK_TAGS_ID, JAVADOC_CLOSED_TAG, JAVADOC_CODE_TAGS, JAVADOC_CODE_TAGS_ID, JAVADOC_HEADER, JAVADOC_HEADER_LENGTH, JAVADOC_IMMUTABLE_TAGS, JAVADOC_IMMUTABLE_TAGS_ID, JAVADOC_NEWLINE_TAGS, JAVADOC_PARAM_TAGS, JAVADOC_SEPARATOR_TAGS, JAVADOC_SEPARATOR_TAGS_ID, JAVADOC_SINGLE_BREAK_TAG, JAVADOC_SINGLE_BREAK_TAG_ID, JAVADOC_SINGLE_TAGS_ID, JAVADOC_SPECIAL_TAGS, JAVADOC_SPECIAL_TAGS_ID, JAVADOC_STAR, JAVADOC_TAG_PREFIX, JAVADOC_TAGS_ID_MASK, JAVADOC_TAGS_INDEX_MASK, LINE_COMMENT_PREFIX, LINE_COMMENT_PREFIX_LENGTH, LINK_TAG_POSTFIX, LINK_TAG_PREFIX, LINK_TAG_PREFIX_STRING
 
Fields inherited from interface org.eclipse.jdt.internal.compiler.parser.JavadocTagConstants
ALL_TAGS_LENGTH, BLOCK_IDX, BLOCK_TAGS, BLOCK_TAGS_LENGTH, CLASS_TAGS, FIELD_TAGS, HREF_TAG, INLINE_IDX, INLINE_TAGS, INLINE_TAGS_LENGTH, METHOD_TAGS, NO_TAG_VALUE, ORDERED_TAGS_NUMBER, PACKAGE_TAGS, PARAM_TAG_EXPECTED_ORDER, SEE_TAG_EXPECTED_ORDER, TAG_AUTHOR, TAG_AUTHOR_LENGTH, TAG_AUTHOR_VALUE, TAG_CATEGORY, TAG_CATEGORY_LENGTH, TAG_CATEGORY_VALUE, TAG_CODE, TAG_CODE_LENGTH, TAG_CODE_VALUE, TAG_DEPRECATED, TAG_DEPRECATED_LENGTH, TAG_DEPRECATED_VALUE, TAG_DOC_ROOT, TAG_DOC_ROOT_LENGTH, TAG_DOC_ROOT_VALUE, TAG_EXCEPTION, TAG_EXCEPTION_LENGTH, TAG_EXCEPTION_VALUE, TAG_INHERITDOC, TAG_INHERITDOC_LENGTH, TAG_INHERITDOC_VALUE, TAG_LINK, TAG_LINK_LENGTH, TAG_LINK_VALUE, TAG_LINKPLAIN, TAG_LINKPLAIN_LENGTH, TAG_LINKPLAIN_VALUE, TAG_LITERAL, TAG_LITERAL_LENGTH, TAG_LITERAL_VALUE, TAG_OTHERS_VALUE, TAG_PARAM, TAG_PARAM_LENGTH, TAG_PARAM_VALUE, TAG_RETURN, TAG_RETURN_LENGTH, TAG_RETURN_VALUE, TAG_SEE, TAG_SEE_LENGTH, TAG_SEE_VALUE, TAG_SERIAL, TAG_SERIAL_DATA, TAG_SERIAL_DATA_LENGTH, TAG_SERIAL_DATA_VALUE, TAG_SERIAL_FIELD, TAG_SERIAL_FIELD_LENGTH, TAG_SERIAL_FIELD_VALUE, TAG_SERIAL_LENGTH, TAG_SERIAL_VALUE, TAG_SINCE, TAG_SINCE_LENGTH, TAG_SINCE_VALUE, TAG_THROWS, TAG_THROWS_LENGTH, TAG_THROWS_VALUE, TAG_VALUE, TAG_VALUE_LENGTH, TAG_VALUE_VALUE, TAG_VERSION, TAG_VERSION_LENGTH, TAG_VERSION_VALUE, THROWS_TAG_EXPECTED_ORDER
 
Constructor Summary
FormatJavadocBlock(int start, int end, int line, int value)
           
 
Method Summary
 boolean hasTextOnTagLine()
          Returns whether the text is on the same line of the tag or not.
 boolean isDescription()
          Returns whether the block is the javadoc comment description or not.
 boolean isFirst()
          Returns whether the block is the first block of the javadoc comment or not (independently of the fact it's a description or not).
 boolean isHeaderLine()
          Returns whether the first block starts on the same line than the javadoc starting delimiter or not.
 boolean isInDescription()
          Returns whether the block is a description or inlined in a description.
 boolean isInlined()
          Returns whether the text is on the same line of the tag.
 boolean isInParamTag()
          Returns whether the block is a param tag or inlined in a param tag.
 boolean isOneLineTag()
          Returns whether the text is on the same line of the tag.
 boolean isParamTag()
          Returns whether the block is a param tag or not.
 java.lang.String toStringDebug(char[] source)
           
 void toStringDebug(java.lang.StringBuffer buffer, char[] source)
           
 
Methods inherited from class org.eclipse.jdt.internal.formatter.FormatJavadocNode
getLength, isText, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FormatJavadocBlock

public FormatJavadocBlock(int start,
                          int end,
                          int line,
                          int value)
Method Detail

hasTextOnTagLine

public boolean hasTextOnTagLine()
Returns whether the text is on the same line of the tag or not.

Returns:
true if the text is on the same line than the tag, false otherwise.

isDescription

public boolean isDescription()
Returns whether the block is the javadoc comment description or not. The description begins after the starting delimiter and continues until the tag section.

Returns:
true if the block is the javadoc description, false otherwise.

isFirst

public boolean isFirst()
Returns whether the block is the first block of the javadoc comment or not (independently of the fact it's a description or not).

Returns:
true if the block is the first of the javadoc comment, false otherwise.

isHeaderLine

public boolean isHeaderLine()
Returns whether the first block starts on the same line than the javadoc starting delimiter or not.

Returns:
true if the the first block starts on the same line than the javadoc starting delimiter, false otherwise.

isInDescription

public boolean isInDescription()
Returns whether the block is a description or inlined in a description.

Returns:
true if the block is a description or inlined in a description, false otherwise.
See Also:
isParamTag()

isInlined

public boolean isInlined()
Returns whether the text is on the same line of the tag.

Returns:
true if the text is on the same line than the tag, false otherwise.

isInParamTag

public boolean isInParamTag()
Returns whether the block is a param tag or inlined in a param tag.

Returns:
true if the block is a param tag or inlined in a param tag, false otherwise.
See Also:
isParamTag()

isOneLineTag

public boolean isOneLineTag()
Returns whether the text is on the same line of the tag.

Returns:
true if the text is on the same line than the tag, false otherwise.

isParamTag

public boolean isParamTag()
Returns whether the block is a param tag or not. Note that this also includes @serialField, @throws and @exception tags.

Returns:
true if the block is a param tag, false otherwise.

toStringDebug

public java.lang.String toStringDebug(char[] source)
Overrides:
toStringDebug in class FormatJavadocNode

toStringDebug

public void toStringDebug(java.lang.StringBuffer buffer,
                          char[] source)
Overrides:
toStringDebug in class FormatJavadocNode