public class FormatJavadocText extends FormatJavadocNode implements IJavaDocTagConstants
Text may be simple as Line inside a javadoc comment block
or may be a html tag. Note that to minimize memory footprint, only text
positions are stored.
Simple text may have one or several lines. When it has several lines, the
positions of the line breaks are also stored in the separators array.
When text has html tags, then they are stored in htmlNodes array
in a recursive way.
linesBefore, lineStart, sourceEnd, sourceStartBLOCK_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_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_STRINGALL_TAGS_LENGTH, BLOCK_IDX, BLOCK_TAGS, BLOCK_TAGS_LENGTH, CLASS_TAGS, COMPILATION_UNIT_TAGS, FIELD_TAGS, HREF_TAG, INLINE_IDX, INLINE_TAGS, INLINE_TAGS_LENGTH, JAVADOC_TAG_TYPE, 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_NAMES, 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_TYPE_BLOCK, TAG_TYPE_INLINE, TAG_TYPE_NONE, TAG_VALUE, TAG_VALUE_LENGTH, TAG_VALUE_VALUE, TAG_VERSION, TAG_VERSION_LENGTH, TAG_VERSION_VALUE, THROWS_TAG_EXPECTED_ORDER| Constructor and Description |
|---|
FormatJavadocText(int start,
int end,
int line,
int htmlIndex,
int htmlDepth) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isClosingHtmlTag()
Returns whether the text is a closing html tag or not.
|
boolean |
isHtmlTag()
Returns whether the text is a html tag or not.
|
boolean |
isImmutable()
Returns whether the text is immutable or not.
|
boolean |
isImmutableHtmlTag()
Returns whether the node is an immutable html tag or not.
|
boolean |
isText()
Returns whether the node is a text (see
FormatJavadocText or not. |
boolean |
isTextAfterHtmlSeparatorTag(int separatorIndex)
Returns whether the text at the given separator index position is after a
separator tag or not.
|
protected void |
toString(java.lang.StringBuffer buffer) |
void |
toStringDebug(java.lang.StringBuffer buffer,
char[] source) |
getLength, toString, toStringDebugpublic FormatJavadocText(int start,
int end,
int line,
int htmlIndex,
int htmlDepth)
public boolean isClosingHtmlTag()
true if the node is an html tag and has '/' before its
name (e.g. ), false otherwise.public boolean isHtmlTag()
true if the node is a html tag, false
otherwise.public boolean isImmutableHtmlTag()
The text in an immutable tags is never formatted.
true if the node is an immutable tag,
false otherwise.public boolean isImmutable()
A text in considered as immutable when it belongs to an immutable block or when it's an immutable html tag.
isImmutable in class FormatJavadocNodetrue if the node is an immutable tag,
false otherwise.public boolean isTextAfterHtmlSeparatorTag(int separatorIndex)
true if the text is after a separator tag,
false otherwise or if the given index is out the range of
the text separators.public boolean isText()
FormatJavadocNodeFormatJavadocText or not.
In case not, that means that the node is an block (see
FormatJavadocBlock).isText in class FormatJavadocNodetrue if the node is a text false
otherwise.protected void toString(java.lang.StringBuffer buffer)
toString in class FormatJavadocNodepublic void toStringDebug(java.lang.StringBuffer buffer,
char[] source)
toStringDebug in class FormatJavadocNode