Class Block
- java.lang.Object
-
- org.spockframework.compiler.model.Node<Method,java.util.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,java.util.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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>
getDescriptions()
Block
getNext()
<T extends Block>
TgetNext(java.lang.Class<T> blockType)
abstract BlockParseInfo
getParseInfo()
Block
getPrevious()
<T extends Block>
TgetPrevious(java.lang.Class<T> blockType)
boolean
isFirst()
boolean
isFirstInChain()
boolean
isLast()
void
setNext(Block block)
void
setPrevious(Block block)
-
-
-
Constructor Detail
-
Block
public Block(Method parent)
-
-
Method Detail
-
getDescriptions
public java.util.List<java.lang.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(java.lang.Class<T> blockType)
-
getNext
public <T extends Block> T getNext(java.lang.Class<T> blockType)
-
isFirst
public boolean isFirst()
-
isLast
public boolean isLast()
-
isFirstInChain
public boolean isFirstInChain()
-
getParseInfo
public abstract BlockParseInfo getParseInfo()
-
-