Class TextElement

  • All Implemented Interfaces:
    IDocElement

    public final class TextElement
    extends ASTNode
    implements IDocElement
    AST node for a text element within a doc comment.
     TextElement:
         Sequence of characters not including a close comment delimiter */
     
    Since:
    3.0
    See Also:
    Javadoc
    Restriction:
    This class is not intended to be instantiated by clients.
    • Field Detail

      • TEXT_PROPERTY

        public static final SimplePropertyDescriptor TEXT_PROPERTY
        The "text" structural property of this node type (type: String).
        Since:
        3.0
    • Method Detail

      • propertyDescriptors

        public static List propertyDescriptors​(int apiLevel)
        Returns a list of structural property descriptors for this node type. Clients must not modify the result.
        Parameters:
        apiLevel - the API level; one of the AST.JLS* constants
        Returns:
        a list of property descriptors (element type: StructuralPropertyDescriptor)
        Since:
        3.0
      • getText

        public String getText()
        Returns this node's text.
        Returns:
        the text of this node
      • 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. The text element must not include a block comment closing delimiter "*"+"/".

        Parameters:
        text - the text of this node
        Throws:
        IllegalArgumentException - if the text is null or contains a block comment closing delimiter