Class CollectionLiteralBlock

java.lang.Object
com.cloudbees.groovy.cps.impl.CollectionLiteralBlock
All Implemented Interfaces:
Block, Serializable
Direct Known Subclasses:
ListBlock, MapBlock, NewArrayFromInitializersBlock

public abstract class CollectionLiteralBlock extends Object implements Block
Turns a list of Block into a collection object. Common part of ListBlock and MapBlock
Author:
Kohsuke Kawaguchi
See Also:
  • Constructor Details

    • CollectionLiteralBlock

      public CollectionLiteralBlock(Block... args)
  • Method Details

    • eval

      public Next eval(Env e, Continuation k)
      Description copied from interface: Block
      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.

      Specified by:
      eval in interface Block
    • toCollection

      protected abstract Object toCollection(Object[] result)