| Package | Description |
|---|---|
| com.cloudbees.groovy.cps | |
| com.cloudbees.groovy.cps.impl |
Even though classes in this package is public, they should not be referenced from outside this library.
|
| Modifier and Type | Class and Description |
|---|---|
static class |
Block.Noop |
class |
LValueBlock
Base class for
Block that can come to the left hand side of an assignment, aka "l-value"
Subtypes implement LValueBlock.evalLValue(Env, Continuation) that computes LValue object,
which provides read/write access. |
| Modifier and Type | Field and Description |
|---|---|
Block |
CaseExpression.body |
Block |
Next.f |
Block |
CatchExpression.handler
Code that executes up on receiving an exception.
|
Block |
CaseExpression.matcher
Expression in the case that decides the match.
|
static Block |
Block.NOOP
A function that does nothing.
|
| Modifier and Type | Method and Description |
|---|---|
Block |
LValueBlock.asLValue()
|
Block |
Builder.assert_(Block cond,
Block msg,
String sourceText) |
Block |
Builder.assert_(Block cond,
String sourceText) |
Block |
Builder.assign(int line,
LValueBlock lhs,
Block rhs) |
Block |
Builder.bitwiseAnd(int line,
Block lhs,
Block rhs) |
Block |
Builder.bitwiseAndEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
Builder.bitwiseNegation(int line,
Block b) |
Block |
Builder.bitwiseOr(int line,
Block lhs,
Block rhs) |
Block |
Builder.bitwiseOrEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
Builder.bitwiseXor(int line,
Block lhs,
Block rhs) |
Block |
Builder.bitwiseXorEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
Builder.block(Block... bodies)
{@code { ...
|
Block |
Builder.break_(String label) |
Block |
Builder.cast(int line,
Block block,
Class type,
boolean coerce)
Cast to type.
|
Block |
Builder.closure(int line,
List<Class> parameterTypes,
List<String> parameters,
Block body) |
Block |
Builder.compareEqual(int line,
Block lhs,
Block rhs) |
Block |
Builder.compareNotEqual(int line,
Block lhs,
Block rhs) |
Block |
Builder.compareTo(int line,
Block lhs,
Block rhs) |
Block |
Builder.constant(Object o) |
Block |
Builder.continue_(String label) |
Block |
Builder.declareVariable(Class type,
String name) |
Block |
Builder.declareVariable(int line,
Class type,
String name,
Block init) |
Block |
Builder.div(int line,
Block lhs,
Block rhs) |
Block |
Builder.divEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
Builder.doWhile(String label,
Block body,
Block cond) |
Block |
Builder.elvisOp(Block cond,
Block falseExp)
x ?: y |
Block |
Builder.false_() |
Block |
Builder.findRegex(int line,
Block lhs,
Block rhs)
lhs =~ rhs |
Block |
Builder.forInLoop(int line,
String label,
Class type,
String variable,
Block collection,
Block body)
{@code for (x in col) { ...
|
Block |
Builder.forLoop(String label,
Block e1,
Block e2,
Block e3,
Block body)
{@code for (e1; e2; e3) { ...
|
Block |
Builder.functionCall(int line,
Block lhs,
Block name,
boolean safe,
Block... argExps) |
Block |
Builder.functionCall(int line,
Block lhs,
String name,
Block... argExps)
LHS.name(...) |
Block |
Builder.greaterThan(int line,
Block lhs,
Block rhs) |
Block |
Builder.greaterThanEqual(int line,
Block lhs,
Block rhs) |
Block |
Builder.gstring(int line,
Block listOfValues,
Block listOfStrings)
"Foo bar zot ${x}" kind of string |
Block |
Builder.if_(Block cond,
Block then) |
Block |
Builder.if_(Block cond,
Block then,
Block els)
{@code if (...) { ...
|
Block |
Builder.instanceOf(int line,
Block value,
Block type) |
Block |
Builder.intdiv(int line,
Block lhs,
Block rhs) |
Block |
Builder.intdivEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
Builder.isCase(int line,
Block lhs,
Block rhs)
lhs in rhs |
Block |
Builder.javaThis_()
|
Block |
Builder.leftShift(int line,
Block lhs,
Block rhs)
lhs << rhs |
Block |
Builder.leftShiftEqual(int line,
LValueBlock lhs,
Block rhs)
lhs <<= rhs |
Block |
Builder.lessThan(int line,
Block lhs,
Block rhs) |
Block |
Builder.lessThanEqual(int line,
Block lhs,
Block rhs) |
Block |
Builder.list(Block... args)
[a,b,c,d] that creates a List. |
Block |
Builder.localVariableAssignOp(int line,
String name,
String operator,
Block rhs)
Assignment operator to a local variable, such as
x += 3 |
Block |
Builder.logicalAnd(int line,
Block lhs,
Block rhs)
lhs && rhs |
Block |
Builder.logicalOr(int line,
Block lhs,
Block rhs)
lhs || rhs |
Block |
Builder.map(Block... blocks)
Map literal:
[ a:b, c:d, e:f ] ...
We expect arguments to be multiple of two. |
Block |
Builder.map(List<Block> blocks) |
Block |
Builder.matchRegex(int line,
Block lhs,
Block rhs)
lhs ==~ rhs |
Block |
Builder.methodPointer(int line,
Block lhs,
Block methodName) |
Block |
Builder.minus(int line,
Block lhs,
Block rhs) |
Block |
Builder.minusEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
Builder.mod(int line,
Block lhs,
Block rhs) |
Block |
Builder.modEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
Builder.multiply(int line,
Block lhs,
Block rhs) |
Block |
Builder.multiplyEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
Builder.new_(int line,
Block type,
Block... argExps) |
Block |
Builder.new_(int line,
Class type,
Block... argExps)
Object instantiation.
|
Block |
Builder.newArray(int line,
Class type,
Block... argExps)
Array instantiation like
new String[1][5] |
Block |
Builder.newArrayFromInitializers(Block... args)
Array with initializers like
new Object[] {1, "two"} which exists in Java but not Groovy. |
Block |
Builder.noop() |
Block |
Builder.not(int line,
Block b)
!b |
Block |
Builder.null_() |
Block |
Builder.one() |
Block |
Builder.plus(int line,
Block lhs,
Block rhs) |
Block |
Builder.plusEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
Builder.postfixDec(int line,
LValueBlock body)
x-- |
Block |
Builder.postfixInc(int line,
LValueBlock body)
x++ |
Block |
Builder.power(int line,
Block lhs,
Block rhs) |
Block |
Builder.powerEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
Builder.prefixDec(int line,
LValueBlock body)
--x |
Block |
Builder.prefixInc(int line,
LValueBlock body)
++x |
Block |
Builder.range(int line,
Block from,
Block to,
boolean inclusive)
x..y or x..>y to create a range |
Block |
Builder.return_(Block exp)
return exp; |
Block |
Builder.rightShift(int line,
Block lhs,
Block rhs)
lhs >> rhs |
Block |
Builder.rightShiftEqual(int line,
LValueBlock lhs,
Block rhs)
lhs >>= rhs |
Block |
Builder.rightShiftUnsigned(int line,
Block lhs,
Block rhs)
lhs >>> rhs |
Block |
Builder.rightShiftUnsignedEqual(int line,
LValueBlock lhs,
Block rhs)
lhs >>>= rhs |
Block |
Builder.sandboxCast(int line,
Block block,
Class<?> type,
boolean ignoreAutoboxing,
boolean strict)
Deprecated.
Just for compatibility with old scripts; prefer
Builder.sandboxCastOrCoerce(int, com.cloudbees.groovy.cps.Block, java.lang.Class<?>, boolean, boolean, boolean) |
Block |
Builder.sandboxCastOrCoerce(int line,
Block block,
Class<?> type,
boolean ignoreAutoboxing,
boolean coerce,
boolean strict)
Cast to type when
CastExpression.isCoerce() from SandboxCpsTransformer. |
Block |
Builder.sequence(Block... bodies)
Like
Builder.block(Block...) but it doesn't create a new scope. |
Block |
Builder.sequence(Block b) |
Block |
Builder.sequence(Block exp1,
Block exp2) |
Block |
Builder.setLocalVariable(int line,
String name,
Block rhs) |
Block |
Builder.setProperty(int line,
Block lhs,
Block property,
Block rhs) |
Block |
Builder.setProperty(int line,
Block lhs,
String property,
Block rhs) |
Block |
Builder.staticCall(int line,
Class lhs,
String name,
Block... argExps) |
Block |
Builder.super_(Class senderType)
Block that's only valid as a LHS of a method call like
super.foo(...) |
Block |
Builder.switch_(String label,
Block switchExp,
Block defaultStmt,
CaseExpression... caseExps) |
Block |
Builder.ternaryOp(Block cond,
Block trueExp,
Block falseExp) |
Block |
Builder.this_() |
Block |
Builder.throw_(int line,
Block exp)
throw exp; |
Block |
Builder.true_() |
Block |
Builder.tryCatch(Block body,
Block finally_,
CatchExpression... catches) |
Block |
Builder.tryCatch(Block body,
List<CatchExpression> catches)
{@code
try {
...
|
Block |
Builder.tryCatch(Block body,
List<CatchExpression> catches,
Block finally_) |
Block |
Builder.two() |
Block |
Builder.unaryMinus(int line,
Block lhs) |
Block |
Builder.unaryPlus(int line,
Block lhs) |
Block |
Builder.while_(String label,
Block cond,
Block body) |
Block |
Builder.yield(Object o) |
Block |
Builder.zero() |
| Modifier and Type | Method and Description |
|---|---|
LValueBlock |
Builder.array(int line,
Block lhs,
Block index) |
Block |
Builder.assert_(Block cond,
Block msg,
String sourceText) |
Block |
Builder.assert_(Block cond,
String sourceText) |
Block |
Builder.assign(int line,
LValueBlock lhs,
Block rhs) |
LValueBlock |
Builder.attribute(int line,
Block lhs,
Block property,
boolean safe) |
Block |
Builder.bitwiseAnd(int line,
Block lhs,
Block rhs) |
Block |
Builder.bitwiseAndEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
Builder.bitwiseNegation(int line,
Block b) |
Block |
Builder.bitwiseOr(int line,
Block lhs,
Block rhs) |
Block |
Builder.bitwiseOrEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
Builder.bitwiseXor(int line,
Block lhs,
Block rhs) |
Block |
Builder.bitwiseXorEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
Builder.block(Block... bodies)
{@code { ...
|
CaseExpression |
Builder.case_(int line,
Block matcher,
Block body) |
Block |
Builder.cast(int line,
Block block,
Class type,
boolean coerce)
Cast to type.
|
Block |
Builder.closure(int line,
List<Class> parameterTypes,
List<String> parameters,
Block body) |
Block |
Builder.compareEqual(int line,
Block lhs,
Block rhs) |
Block |
Builder.compareNotEqual(int line,
Block lhs,
Block rhs) |
Block |
Builder.compareTo(int line,
Block lhs,
Block rhs) |
Block |
Builder.declareVariable(int line,
Class type,
String name,
Block init) |
Block |
Builder.div(int line,
Block lhs,
Block rhs) |
Block |
Builder.divEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
Builder.doWhile(String label,
Block body,
Block cond) |
Block |
Builder.elvisOp(Block cond,
Block falseExp)
x ?: y |
Block |
Builder.findRegex(int line,
Block lhs,
Block rhs)
lhs =~ rhs |
Block |
Builder.forInLoop(int line,
String label,
Class type,
String variable,
Block collection,
Block body)
{@code for (x in col) { ...
|
Block |
Builder.forLoop(String label,
Block e1,
Block e2,
Block e3,
Block body)
{@code for (e1; e2; e3) { ...
|
Block |
Builder.functionCall(int line,
Block lhs,
Block name,
boolean safe,
Block... argExps) |
Block |
Builder.functionCall(int line,
Block lhs,
Block name,
boolean safe,
Block... argExps) |
Block |
Builder.functionCall(int line,
Block lhs,
String name,
Block... argExps)
LHS.name(...) |
Block |
Builder.functionCall(int line,
Block lhs,
String name,
Block... argExps)
LHS.name(...) |
Block |
Builder.greaterThan(int line,
Block lhs,
Block rhs) |
Block |
Builder.greaterThanEqual(int line,
Block lhs,
Block rhs) |
Block |
Builder.gstring(int line,
Block listOfValues,
Block listOfStrings)
"Foo bar zot ${x}" kind of string |
Block |
Builder.if_(Block cond,
Block then) |
Block |
Builder.if_(Block cond,
Block then,
Block els)
{@code if (...) { ...
|
Block |
Builder.instanceOf(int line,
Block value,
Block type) |
Block |
Builder.intdiv(int line,
Block lhs,
Block rhs) |
Block |
Builder.intdivEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
Builder.isCase(int line,
Block lhs,
Block rhs)
lhs in rhs |
Block |
Builder.leftShift(int line,
Block lhs,
Block rhs)
lhs << rhs |
Block |
Builder.leftShiftEqual(int line,
LValueBlock lhs,
Block rhs)
lhs <<= rhs |
Block |
Builder.lessThan(int line,
Block lhs,
Block rhs) |
Block |
Builder.lessThanEqual(int line,
Block lhs,
Block rhs) |
Block |
Builder.list(Block... args)
[a,b,c,d] that creates a List. |
Block |
Builder.localVariableAssignOp(int line,
String name,
String operator,
Block rhs)
Assignment operator to a local variable, such as
x += 3 |
Block |
Builder.logicalAnd(int line,
Block lhs,
Block rhs)
lhs && rhs |
Block |
Builder.logicalOr(int line,
Block lhs,
Block rhs)
lhs || rhs |
Block |
Builder.map(Block... blocks)
Map literal:
[ a:b, c:d, e:f ] ...
We expect arguments to be multiple of two. |
Block |
Builder.matchRegex(int line,
Block lhs,
Block rhs)
lhs ==~ rhs |
Block |
Builder.methodPointer(int line,
Block lhs,
Block methodName) |
Block |
Builder.minus(int line,
Block lhs,
Block rhs) |
Block |
Builder.minusEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
Builder.mod(int line,
Block lhs,
Block rhs) |
Block |
Builder.modEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
Builder.multiply(int line,
Block lhs,
Block rhs) |
Block |
Builder.multiplyEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
Builder.new_(int line,
Block type,
Block... argExps) |
Block |
Builder.new_(int line,
Block type,
Block... argExps) |
Block |
Builder.new_(int line,
Class type,
Block... argExps)
Object instantiation.
|
Block |
Builder.newArray(int line,
Class type,
Block... argExps)
Array instantiation like
new String[1][5] |
Block |
Builder.newArrayFromInitializers(Block... args)
Array with initializers like
new Object[] {1, "two"} which exists in Java but not Groovy. |
Block |
Builder.not(int line,
Block b)
!b |
Block |
Builder.plus(int line,
Block lhs,
Block rhs) |
Block |
Builder.plusEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
Builder.power(int line,
Block lhs,
Block rhs) |
Block |
Builder.powerEqual(int line,
LValueBlock lhs,
Block rhs) |
LValueBlock |
Builder.property(int line,
Block lhs,
Block property,
boolean safe) |
LValueBlock |
Builder.property(int line,
Block lhs,
String property) |
Block |
Builder.range(int line,
Block from,
Block to,
boolean inclusive)
x..y or x..>y to create a range |
Block |
Builder.return_(Block exp)
return exp; |
Block |
Builder.rightShift(int line,
Block lhs,
Block rhs)
lhs >> rhs |
Block |
Builder.rightShiftEqual(int line,
LValueBlock lhs,
Block rhs)
lhs >>= rhs |
Block |
Builder.rightShiftUnsigned(int line,
Block lhs,
Block rhs)
lhs >>> rhs |
Block |
Builder.rightShiftUnsignedEqual(int line,
LValueBlock lhs,
Block rhs)
lhs >>>= rhs |
Block |
Builder.sandboxCast(int line,
Block block,
Class<?> type,
boolean ignoreAutoboxing,
boolean strict)
Deprecated.
Just for compatibility with old scripts; prefer
Builder.sandboxCastOrCoerce(int, com.cloudbees.groovy.cps.Block, java.lang.Class<?>, boolean, boolean, boolean) |
Block |
Builder.sandboxCastOrCoerce(int line,
Block block,
Class<?> type,
boolean ignoreAutoboxing,
boolean coerce,
boolean strict)
Cast to type when
CastExpression.isCoerce() from SandboxCpsTransformer. |
Block |
Builder.sequence(Block... bodies)
Like
Builder.block(Block...) but it doesn't create a new scope. |
Block |
Builder.sequence(Block b) |
Block |
Builder.sequence(Block exp1,
Block exp2) |
Block |
Builder.setLocalVariable(int line,
String name,
Block rhs) |
Block |
Builder.setProperty(int line,
Block lhs,
Block property,
Block rhs) |
Block |
Builder.setProperty(int line,
Block lhs,
String property,
Block rhs) |
Block |
Builder.staticCall(int line,
Class lhs,
String name,
Block... argExps) |
Block |
Builder.switch_(String label,
Block switchExp,
Block defaultStmt,
CaseExpression... caseExps) |
Block |
Builder.ternaryOp(Block cond,
Block trueExp,
Block falseExp) |
Block |
Builder.throw_(int line,
Block exp)
throw exp; |
Block |
Builder.tryCatch(Block body,
Block finally_,
CatchExpression... catches) |
Block |
Builder.tryCatch(Block body,
List<CatchExpression> catches)
{@code
try {
...
|
Block |
Builder.tryCatch(Block body,
List<CatchExpression> catches,
Block finally_) |
Block |
Builder.unaryMinus(int line,
Block lhs) |
Block |
Builder.unaryPlus(int line,
Block lhs) |
Block |
Builder.while_(String label,
Block cond,
Block body) |
| Modifier and Type | Method and Description |
|---|---|
Block |
Builder.map(List<Block> blocks) |
| Constructor and Description |
|---|
CaseExpression(SourceLocation loc,
Block matcher,
Block body) |
CatchExpression(Class<? extends Throwable> type,
String name,
Block handler) |
Continuable(Block block)
Creates a
Continuable that executes the block of code in a fresh empty environment. |
Continuable(Block block,
Env e)
Creates a
Continuable that executes the block in the specified environment. |
Next(Block f,
Env e,
Continuation k) |
| Modifier and Type | Interface and Description |
|---|---|
interface |
CallSiteBlock
Block that has CallSiteTags. |
| Modifier and Type | Class and Description |
|---|---|
class |
ArrayAccessBlock
Array access like
x[3] or x['foo'] |
class |
AssertBlock
assert exp : msg;
|
class |
AssignmentBlock
Assignment operator
exp=rhs
TODO: tuple assignment |
class |
AttributeAccessBlock
Attribute access expression like
foo.@bar, which is an l-value. |
class |
BlockScopedBlock |
class |
BreakBlock
"break" statement to exit a loop.
|
class |
CallSiteBlockSupport
Default implementation of
CallSiteBlock. |
class |
ClosureBlock
Closure instantiation: { ...
|
class |
CollectionLiteralBlock
Turns a list of
Block into a collection object. |
class |
ConstantBlock
Constant value.
|
class |
ContinueBlock
"continue" statement to repeat a loop.
|
class |
DoWhileBlock
do { ...
|
class |
ElvisBlock
x ?: y
|
class |
ExcrementOperatorBlock
"++x", "--x", "x++", or "x--" operator.
|
class |
ForInLoopBlock
for (Type var in col) { ...
|
class |
ForLoopBlock
for (e1; e2; e3) { ...
|
class |
FunctionCallBlock
lhs.name(arg,arg,...)
|
class |
IfBlock
if (...) { ...
|
class |
JavaThisBlock
Resolves the current
Env.closureOwner() value. |
class |
ListBlock
[a,b,c,d] to list.
|
class |
LocalVariableBlock
Access to local variables and method parameters.
|
class |
LogicalOpBlock
Logical operator (
&& and ||) |
class |
MapBlock
[a:b, c:d, e:f, ...]
|
class |
MethodPointerBlock
Method pointer expression:
LHS&.methodName |
class |
NewArrayBlock
Multi-dimensional array instantiation like
new String[1][2][3] |
class |
NewArrayFromInitializersBlock |
class |
NotBlock
!b
|
class |
PropertyAccessBlock
Property access expression like
foo.bar, which is an l-value. |
class |
ReturnBlock |
class |
SequenceBlock
exp1; exp2
|
class |
StaticFieldBlock |
class |
SuperBlock |
class |
SuspendBlock
Gets a value from local variable and removes it.
|
class |
SwitchBlock
switch/case statement.
|
class |
ThrowBlock |
class |
TryCatchBlock |
class |
VariableDeclBlock |
class |
WhileBlock
while(...) { ...
|
class |
YieldBlock
Yield a value and suspend the execution of the program.
|
| Modifier and Type | Method and Description |
|---|---|
Block |
CpsCallableInvocation.asBlock()
Creates a
Block that performs this invocation and pass the result to the given Continuation. |
Copyright © 2011–2019. All rights reserved.