Class Method

java.lang.Object
org.spockframework.compiler.model.Node<Spec,org.codehaus.groovy.ast.MethodNode>
org.spockframework.compiler.model.Method
Direct Known Subclasses:
FeatureMethod, FixtureMethod, HelperMethod

public abstract class Method extends Node<Spec,org.codehaus.groovy.ast.MethodNode>
AST node representing a Spec method (one of fixture method, feature method, helper method).
Author:
Peter Niederwieser
  • Constructor Details

    • Method

      public Method(Spec parent, org.codehaus.groovy.ast.MethodNode code)
  • Method Details

    • getFirstBlock

      public Block getFirstBlock()
    • getLastBlock

      public Block getLastBlock()
    • getStatements

      public List<org.codehaus.groovy.ast.stmt.Statement> getStatements()
    • getBlocks

      public Iterable<Block> getBlocks()
    • addBlock

      public Block addBlock(Block block)
    • accept

      public void accept(ISpecVisitor visitor) throws Exception
      Specified by:
      accept in class Node<Spec,org.codehaus.groovy.ast.MethodNode>
      Throws:
      Exception