org.spockframework.compiler.model
Class Method

java.lang.Object
  extended by org.spockframework.compiler.model.Node<Spec,org.codehaus.groovy.ast.MethodNode>
      extended by 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 Summary
Method(Spec parent, org.codehaus.groovy.ast.MethodNode code)
           
 
Method Summary
 void accept(ISpecVisitor visitor)
           
 Block addBlock(Block block)
           
 java.lang.Iterable<Block> getBlocks()
           
 Block getFirstBlock()
           
 Block getLastBlock()
           
 java.util.List<org.codehaus.groovy.ast.stmt.Statement> getStatements()
           
 
Methods inherited from class org.spockframework.compiler.model.Node
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

Method

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

getFirstBlock

public Block getFirstBlock()

getLastBlock

public Block getLastBlock()

getStatements

public java.util.List<org.codehaus.groovy.ast.stmt.Statement> getStatements()

getBlocks

public java.lang.Iterable<Block> getBlocks()

addBlock

public Block addBlock(Block block)

accept

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


Copyright © 2013. All rights reserved