Class AbstractTextElement

java.lang.Object
org.eclipse.jdt.core.dom.ASTNode
org.eclipse.jdt.core.dom.AbstractTextElement
All Implemented Interfaces:
IDocElement
Direct Known Subclasses:
JavaDocTextElement, TextElement

public abstract class AbstractTextElement extends ASTNode implements IDocElement
AST node for a text element within a doc comment.
 AbstractTextElement:
     Sequence of characters not including a close comment delimiter */
 
Since:
3.31
See Also:
  • Method Details

    • internalTextPropertyFactory

      public static final SimplePropertyDescriptor internalTextPropertyFactory(Class nodeClass)
      The "text" structural property of this node type (type: String).
    • getTextNameProperty

      public final SimplePropertyDescriptor getTextNameProperty()
      Returns structural property descriptor for the "text" property of this node (child type: String).
      Returns:
      the property descriptor
    • getText

      public String getText()
      Returns this node's tag name, or null if none. For top level doc tags such as parameter tags, the tag name includes the "@" character ("@param"). For inline doc tags such as link tags, the tag name includes the "@" character ("@link"). The tag name may also be null; this is used to represent the material at the start of a doc comment preceding the first explicit tag.
      Returns:
      the tag name, or null if none
    • setText

      public void setText(String text)
      Sets the text of this node to the given value.

      The text element typically includes leading and trailing whitespace that separates it from the immediately preceding or following elements.

      Parameters:
      text - the text of this node
      Throws:
      IllegalArgumentException - if the text is null
    • isNested

      public boolean isNested()
      Returns whether this tag element is nested within another tag element. Nested tag elements appears enclosed in "{" and "}"; certain doc tags, including "@link" and "@linkplain" are only meaningful as nested tags. Top-level (i.e., non-nested) doc tags begin on a new line; certain doc tags, including "@param" and "@see" are only meaningful as top-level tags.

      This convenience methods checks to see whether the parent of this node is of type AbstractTextElement.

      Returns:
      true if this node is a nested tag element, and false if this node is either parented by a doc comment node (Javadoc), or is unparented