Class Block


  • public class Block
    extends Statement
    Block statement AST node type.
     Block:
        { { Statement } }
     
    Since:
    2.0
    Restriction:
    This class is not intended to be instantiated by clients.
    • Field Detail

      • STATEMENTS_PROPERTY

        public static final ChildListPropertyDescriptor STATEMENTS_PROPERTY
        The "statements" structural property of this node type (element type: Statement).
        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
      • statements

        public List statements()
        Returns the live list of statements in this block. Adding and removing nodes from this list affects this node dynamically. All nodes in this list must be Statements; attempts to add any other type of node will trigger an exception.
        Returns:
        the live list of statements in this block (element type: Statement)