Uses of Interface
com.cloudbees.groovy.cps.Block
Packages that use Block
Package
Description
Even though classes in this package is public, they should not be referenced from outside this library.
-
Uses of Block in com.cloudbees.groovy.cps
Classes in com.cloudbees.groovy.cps that implement BlockModifier and TypeClassDescriptionstatic final classclassBase class forBlockthat can come to the left hand side of an assignment, aka "l-value" Subtypes implementLValueBlock.evalLValue(Env, Continuation)that computesLValueobject, which provides read/write access.Fields in com.cloudbees.groovy.cps declared as BlockModifier and TypeFieldDescriptionfinal BlockCaseExpression.bodyfinal BlockNext.ffinal BlockCatchExpression.handlerCode that executes up on receiving an exception.final BlockCaseExpression.matcherExpression in the case that decides the match.static final BlockBlock.NOOPA function that does nothing.Methods in com.cloudbees.groovy.cps that return BlockModifier and TypeMethodDescriptionfinal BlockLValueBlock.asLValue()Builder.assign(int line, LValueBlock lhs, Block rhs) Builder.bitwiseAnd(int line, Block lhs, Block rhs) Builder.bitwiseAndEqual(int line, LValueBlock lhs, Block rhs) Builder.bitwiseNegation(int line, Block b) Builder.bitwiseOrEqual(int line, LValueBlock lhs, Block rhs) Builder.bitwiseXor(int line, Block lhs, Block rhs) Builder.bitwiseXorEqual(int line, LValueBlock lhs, Block rhs) { ... }Cast to type.Builder.compareEqual(int line, Block lhs, Block rhs) Builder.compareNotEqual(int line, Block lhs, Block rhs) Builder.declareVariable(int line, Class type, String name, Block init) Builder.declareVariable(Class type, String name) Builder.divEqual(int line, LValueBlock lhs, Block rhs) x ?: yBuilder.false_()lhs =~ rhsBuilder.forInLoop(int line, String label, Class type, String variable, Block collection, Block body) for (x in col) { ... }for (e1; e2; e3) { ... }Builder.functionCall(int line, Block lhs, Block name, boolean safe, Block... argExps) Builder.functionCall(int line, Block lhs, String name, Block... argExps) LHS.name(...)Builder.greaterThan(int line, Block lhs, Block rhs) Builder.greaterThanEqual(int line, Block lhs, Block rhs) "Foo bar zot ${x}"kind of stringif (...) { ... } else { ... }Builder.instanceOf(int line, Block value, Block type) Builder.intdivEqual(int line, LValueBlock lhs, Block rhs) lhs in rhsBuilder.javaThis_()lhs << rhsBuilder.leftShiftEqual(int line, LValueBlock lhs, Block rhs) lhs <<= rhsBuilder.lessThanEqual(int line, Block lhs, Block rhs) [a,b,c,d]that creates a List.Builder.localVariableAssignOp(int line, String name, String operator, Block rhs) Assignment operator to a local variable, such asx += 3Builder.logicalAnd(int line, Block lhs, Block rhs) lhs && rhslhs || rhsMap literal:[ a:b, c:d, e:f ] ...We expect arguments to be multiple of two.Builder.matchRegex(int line, Block lhs, Block rhs) lhs ==~ rhsBuilder.methodPointer(int line, Block lhs, Block methodName) Builder.minusEqual(int line, LValueBlock lhs, Block rhs) Builder.modEqual(int line, LValueBlock lhs, Block rhs) Builder.multiplyEqual(int line, LValueBlock lhs, Block rhs) Object instantiation.Array instantiation likenew String[1][5]Builder.newArrayFromInitializers(Block... args) Array with initializers likenew Object[] {1, "two"}which exists in Java but not Groovy.Builder.noop()!bBuilder.null_()Builder.one()Builder.plusEqual(int line, LValueBlock lhs, Block rhs) Builder.postfixDec(int line, LValueBlock body) x--Builder.postfixInc(int line, LValueBlock body) x++Builder.powerEqual(int line, LValueBlock lhs, Block rhs) Builder.prefixDec(int line, LValueBlock body) --xBuilder.prefixInc(int line, LValueBlock body) ++xx..yorx..>yto create a rangereturn exp;Builder.rightShift(int line, Block lhs, Block rhs) lhs >> rhsBuilder.rightShiftEqual(int line, LValueBlock lhs, Block rhs) lhs >>= rhsBuilder.rightShiftUnsigned(int line, Block lhs, Block rhs) lhs >>> rhsBuilder.rightShiftUnsignedEqual(int line, LValueBlock lhs, Block rhs) lhs >>>= rhsBuilder.sandboxCast(int line, Block block, Class<?> type, boolean ignoreAutoboxing, boolean strict) Deprecated.Builder.sandboxCastOrCoerce(int line, Block block, Class<?> type, boolean ignoreAutoboxing, boolean coerce, boolean strict) Deprecated.Just for compatibility with old scripts; preferBuilder.cast(int, com.cloudbees.groovy.cps.Block, java.lang.Class, boolean)LikeBuilder.block(Block...)but it doesn't create a new scope.Builder.setLocalVariable(int line, String name, Block rhs) Builder.setProperty(int line, Block lhs, Block property, Block rhs) Builder.setProperty(int line, Block lhs, String property, Block rhs) Builder.staticCall(int line, Class lhs, String name, Block... argExps) Block that's only valid as a LHS of a method call likesuper.foo(...)Builder.switch_(String label, Block switchExp, Block defaultStmt, CaseExpression... caseExps) Builder.this_()throw exp;Builder.true_()Builder.tryCatch(Block body, Block finally_, CatchExpression... catches) Builder.tryCatch(Block body, List<CatchExpression> catches) try { ... } catch (T v) { ... } catch (T v) { ... }Builder.tryCatch(Block body, List<CatchExpression> catches, Block finally_) Builder.two()Builder.unaryMinus(int line, Block lhs) Builder.zero()Methods in com.cloudbees.groovy.cps with parameters of type BlockModifier and TypeMethodDescriptionBuilder.assign(int line, LValueBlock lhs, Block rhs) Builder.bitwiseAnd(int line, Block lhs, Block rhs) Builder.bitwiseAndEqual(int line, LValueBlock lhs, Block rhs) Builder.bitwiseNegation(int line, Block b) Builder.bitwiseOrEqual(int line, LValueBlock lhs, Block rhs) Builder.bitwiseXor(int line, Block lhs, Block rhs) Builder.bitwiseXorEqual(int line, LValueBlock lhs, Block rhs) { ... }Cast to type.Builder.compareEqual(int line, Block lhs, Block rhs) Builder.compareNotEqual(int line, Block lhs, Block rhs) Builder.declareVariable(int line, Class type, String name, Block init) Builder.divEqual(int line, LValueBlock lhs, Block rhs) x ?: ylhs =~ rhsBuilder.forInLoop(int line, String label, Class type, String variable, Block collection, Block body) for (x in col) { ... }for (e1; e2; e3) { ... }Builder.functionCall(int line, Block lhs, Block name, boolean safe, Block... argExps) Builder.functionCall(int line, Block lhs, String name, Block... argExps) LHS.name(...)Builder.greaterThan(int line, Block lhs, Block rhs) Builder.greaterThanEqual(int line, Block lhs, Block rhs) "Foo bar zot ${x}"kind of stringif (...) { ... } else { ... }Builder.instanceOf(int line, Block value, Block type) Builder.intdivEqual(int line, LValueBlock lhs, Block rhs) lhs in rhslhs << rhsBuilder.leftShiftEqual(int line, LValueBlock lhs, Block rhs) lhs <<= rhsBuilder.lessThanEqual(int line, Block lhs, Block rhs) [a,b,c,d]that creates a List.Builder.localVariableAssignOp(int line, String name, String operator, Block rhs) Assignment operator to a local variable, such asx += 3Builder.logicalAnd(int line, Block lhs, Block rhs) lhs && rhslhs || rhsMap literal:[ a:b, c:d, e:f ] ...We expect arguments to be multiple of two.Builder.matchRegex(int line, Block lhs, Block rhs) lhs ==~ rhsBuilder.methodPointer(int line, Block lhs, Block methodName) Builder.minusEqual(int line, LValueBlock lhs, Block rhs) Builder.modEqual(int line, LValueBlock lhs, Block rhs) Builder.multiplyEqual(int line, LValueBlock lhs, Block rhs) Object instantiation.Array instantiation likenew String[1][5]Builder.newArrayFromInitializers(Block... args) Array with initializers likenew Object[] {1, "two"}which exists in Java but not Groovy.!bBuilder.plusEqual(int line, LValueBlock lhs, Block rhs) Builder.powerEqual(int line, LValueBlock lhs, Block rhs) x..yorx..>yto create a rangereturn exp;Builder.rightShift(int line, Block lhs, Block rhs) lhs >> rhsBuilder.rightShiftEqual(int line, LValueBlock lhs, Block rhs) lhs >>= rhsBuilder.rightShiftUnsigned(int line, Block lhs, Block rhs) lhs >>> rhsBuilder.rightShiftUnsignedEqual(int line, LValueBlock lhs, Block rhs) lhs >>>= rhsBuilder.sandboxCast(int line, Block block, Class<?> type, boolean ignoreAutoboxing, boolean strict) Deprecated.Just for compatibility with old scripts; preferBuilder.cast(int, com.cloudbees.groovy.cps.Block, java.lang.Class, boolean)Builder.sandboxCastOrCoerce(int line, Block block, Class<?> type, boolean ignoreAutoboxing, boolean coerce, boolean strict) Deprecated.Just for compatibility with old scripts; preferBuilder.cast(int, com.cloudbees.groovy.cps.Block, java.lang.Class, boolean)LikeBuilder.block(Block...)but it doesn't create a new scope.Builder.setLocalVariable(int line, String name, Block rhs) Builder.setProperty(int line, Block lhs, Block property, Block rhs) Builder.setProperty(int line, Block lhs, String property, Block rhs) Builder.staticCall(int line, Class lhs, String name, Block... argExps) Builder.switch_(String label, Block switchExp, Block defaultStmt, CaseExpression... caseExps) throw exp;Builder.tryCatch(Block body, Block finally_, CatchExpression... catches) Builder.tryCatch(Block body, List<CatchExpression> catches) try { ... } catch (T v) { ... } catch (T v) { ... }Builder.tryCatch(Block body, List<CatchExpression> catches, Block finally_) Builder.unaryMinus(int line, Block lhs) Method parameters in com.cloudbees.groovy.cps with type arguments of type BlockConstructors in com.cloudbees.groovy.cps with parameters of type BlockModifierConstructorDescriptionCaseExpression(SourceLocation loc, Block matcher, Block body) CatchExpression(Class<? extends Throwable> type, String name, Block handler) Continuable(Block block) Creates aContinuablethat executes the block of code in a fresh empty environment.Continuable(Block block, Env e) Creates aContinuablethat executes the block in the specified environment.Next(Block f, Env e, Continuation k) -
Uses of Block in com.cloudbees.groovy.cps.impl
Subinterfaces of Block in com.cloudbees.groovy.cps.implClasses in com.cloudbees.groovy.cps.impl that implement BlockModifier and TypeClassDescriptionclassArray access likex[3]orx['foo']classassert exp : msg;classAssignment operatorexp=rhsTODO: tuple assignmentclassAttribute access expression likefoo.@bar, which is an l-value.classclass"break" statement to exit a loop.classDefault implementation ofCallSiteBlock.classclassClosure instantiation: { ...classTurns a list ofBlockinto a collection object.classConstant value.class"continue" statement to repeat a loop.classdo { ...classx ?: yclass"++x", "--x", "x++", or "x--" operator.classfor (Type var in col) { ...classfor (e1; e2; e3) { ...classlhs.name(arg,arg,...)classif (...) { ...classResolves the currentEnv.closureOwner()value.class[a,b,c,d] to list.classAccess to local variables and method parameters.classLogical operator (&&and||)class[a:b, c:d, e:f, ...]classMethod pointer expression:LHS&.methodNameclassMulti-dimensional array instantiation likenew String[1][2][3]classclass!bclassProperty access expression likefoo.bar, which is an l-value.classclassexp1; exp2classHandlesSpreadExpressionsimilarly to the way thatSpreadMapBlockhandlesSpreadMapExpression, but with agroovy-cps-specificSpreadBlock.SpreadListmarker class.classclassclassclassGets a value from local variable and removes it.classswitch/case statement.classclassclassclasswhile(...) { ...classYield a value and suspend the execution of the program.Methods in com.cloudbees.groovy.cps.impl that return BlockModifier and TypeMethodDescriptionCpsCallableInvocation.asBlock()Creates aBlockthat performs this invocation and pass the result to the givenContinuation.Constructors in com.cloudbees.groovy.cps.impl with parameters of type BlockModifierConstructorDescriptionArrayAccessBlock(SourceLocation loc, Collection<CallSiteTag> tags, Block lhs, Block property) AssertBlock(Block cond, Block msg, String sourceText) AssignmentBlock(SourceLocation loc, Collection<CallSiteTag> tags, LValueBlock lhsExp, Block rhsExp, String compoundOp) AttributeAccessBlock(SourceLocation loc, Collection<CallSiteTag> tags, Block lhs, Block property, boolean safe) BlockScopedBlock(Block exp) CastBlock(SourceLocation loc, Collection<CallSiteTag> tags, Block valueExp, Class<?> type, boolean ignoreAutoboxing, boolean coerce, boolean strict) ClosureBlock(SourceLocation loc, List<Class> parameterTypes, List<String> parameters, Block body, Class<? extends CpsClosure> closureType) CollectionLiteralBlock(Block... args) CpsFunction(List<String> parameters, Block body) DoWhileBlock(String label, Block body, Block cond) ElvisBlock(Block cond, Block falseExp) ForInLoopBlock(SourceLocation loc, String label, Class type, String variable, Block collection, Block body) FunctionCallBlock(SourceLocation loc, Collection<CallSiteTag> tags, Block lhsExp, Block nameExp, boolean safe, Block[] argExps) LogicalOpBlock(Block lhs, Block rhs, boolean and) MethodPointerBlock(SourceLocation loc, Block lhsExp, Block methodNameExp, Collection<CallSiteTag> tags) NewArrayBlock(SourceLocation loc, Class componentType, Block... dimensionExps) NewArrayFromInitializersBlock(Block... args) PropertyAccessBlock(SourceLocation loc, Collection<CallSiteTag> tags, Block lhs, Block property, boolean safe) ReturnBlock(Block exp) SequenceBlock(Block exp1, Block exp2) SpreadBlock(SourceLocation loc, Block listExp) SpreadMapBlock(SourceLocation loc, Block mapExp) SwitchBlock(String label, Block exp, Block default_, List<CaseExpression> cases) ThrowBlock(Block exp) ThrowBlock(SourceLocation loc, Block exp, boolean fillStackTrace) TryBlockEnv(Env parent, Block finally_) TryCatchBlock(List<CatchExpression> catches, Block body, Block finally_) WhileBlock(String label, Block cond, Block body)
Builder.cast(int, com.cloudbees.groovy.cps.Block, java.lang.Class, boolean)