Class Block

java.lang.Object
org.spockframework.compiler.model.Node<Method,List<org.codehaus.groovy.ast.stmt.Statement>>
org.spockframework.compiler.model.Block
Direct Known Subclasses:
AnonymousBlock, CleanupBlock, ExpectBlock, SetupBlock, ThenBlock, WhenBlock, WhereBlock

public abstract class Block extends Node<Method,List<org.codehaus.groovy.ast.stmt.Statement>>
AST node representing a block in a feature method. There are six kinds of blocks: setup-block, expect-block, when-block, then-block, cleanup-block, and where-block.
Author:
Peter Niederwieser
  • Constructor Details

    • Block

      public Block(Method parent)
  • Method Details

    • getDescriptions

      public List<String> getDescriptions()
    • getPrevious

      public Block getPrevious()
    • setPrevious

      public void setPrevious(Block block)
    • getNext

      public Block getNext()
    • setNext

      public void setNext(Block block)
    • getPrevious

      public <T extends Block> T getPrevious(Class<T> blockType)
    • getNext

      public <T extends Block> T getNext(Class<T> blockType)
    • isFirst

      public boolean isFirst()
    • isLast

      public boolean isLast()
    • isFirstInChain

      public boolean isFirstInChain()
    • getParseInfo

      public abstract BlockParseInfo getParseInfo()