org.spockframework.compiler.model
Class Block

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

public abstract class Block
extends Node<Method,List<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 Summary
Block(Method parent)
           
 
Method Summary
 List<String> getDescriptions()
           
 Block getNext()
           
<T extends Block>
T
getNext(Class<T> blockType)
           
abstract  BlockParseInfo getParseInfo()
           
 Block getPrevious()
           
<T extends Block>
T
getPrevious(Class<T> blockType)
           
 boolean isFirst()
           
 boolean isFirstInChain()
           
 boolean isLast()
           
 void setNext(Block block)
           
 void setPrevious(Block block)
           
 
Methods inherited from class org.spockframework.compiler.model.Node
accept, getAst, getName, getParent, setAst, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Block

public Block(Method parent)
Method Detail

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()


Copyright © 2010. All Rights Reserved.