Interface Block

All Superinterfaces:
Serializable
All Known Subinterfaces:
CallSiteBlock
All Known Implementing Classes:
ArrayAccessBlock, AssertBlock, AssignmentBlock, AttributeAccessBlock, Block.Noop, BlockScopedBlock, BreakBlock, CallSiteBlockSupport, CastBlock, ClosureBlock, CollectionLiteralBlock, ConstantBlock, ContinueBlock, DoWhileBlock, ElvisBlock, ExcrementOperatorBlock, ForInLoopBlock, ForLoopBlock, FunctionCallBlock, IfBlock, JavaThisBlock, ListBlock, LocalVariableBlock, LogicalOpBlock, LValueBlock, MapBlock, MethodPointerBlock, NewArrayBlock, NewArrayFromInitializersBlock, NotBlock, PropertyAccessBlock, ReturnBlock, SequenceBlock, SpreadBlock, SpreadMapBlock, StaticFieldBlock, SuperBlock, SuspendBlock, SwitchBlock, ThrowBlock, TryCatchBlock, VariableDeclBlock, WhileBlock, YieldBlock

public interface Block extends Serializable
AST Node of Groovy for CPS execution.
Author:
Kohsuke Kawaguchi
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Block
    A function that does nothing.
  • Method Summary

    Modifier and Type
    Method
    Description
    Executes this expression, then pass the result to the given continuation when it's available.
  • Field Details

    • NOOP

      static final Block NOOP
      A function that does nothing.
  • Method Details

    • eval

      Next eval(Env e, Continuation k)
      Executes this expression, then pass the result to the given continuation when it's available.

      To be more precise, this method does not evaluate the expression by itself synchronously. Instead, the evaluation is done by the caller by repeatedly step executing the resulting Next object.