| Constructor and Description |
|---|
Builder(MethodLocation loc) |
| Modifier and Type | Method and Description |
|---|---|
LValueBlock |
array(int line,
Block lhs,
Block index) |
Block |
assert_(Block cond,
Block msg,
String sourceText) |
Block |
assert_(Block cond,
String sourceText) |
Block |
assign(int line,
LValueBlock lhs,
Block rhs) |
LValueBlock |
attribute(int line,
Block lhs,
Block property,
boolean safe) |
Block |
bitwiseAnd(int line,
Block lhs,
Block rhs) |
Block |
bitwiseAndEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
bitwiseNegation(int line,
Block b) |
Block |
bitwiseOr(int line,
Block lhs,
Block rhs) |
Block |
bitwiseOrEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
bitwiseXor(int line,
Block lhs,
Block rhs) |
Block |
bitwiseXorEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
block(Block... bodies)
{@code { ...
|
Block |
break_(String label) |
CaseExpression |
case_(int line,
Block matcher,
Block body) |
Block |
cast(int line,
Block block,
Class type,
boolean coerce)
Cast to type.
|
Block |
closure(int line,
List<Class> parameterTypes,
List<String> parameters,
Block body) |
Block |
compareEqual(int line,
Block lhs,
Block rhs) |
Block |
compareNotEqual(int line,
Block lhs,
Block rhs) |
Block |
compareTo(int line,
Block lhs,
Block rhs) |
Block |
constant(Object o) |
Builder |
contextualize(CallSiteTag... tags)
Returns a new
Builder that contextualizes call sites with the given tags. |
Block |
continue_(String label) |
Block |
declareVariable(Class type,
String name) |
Block |
declareVariable(int line,
Class type,
String name,
Block init) |
Block |
div(int line,
Block lhs,
Block rhs) |
Block |
divEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
doWhile(String label,
Block body,
Block cond) |
Block |
elvisOp(Block cond,
Block falseExp)
x ?: y |
Block |
false_() |
Block |
findRegex(int line,
Block lhs,
Block rhs)
lhs =~ rhs |
Block |
forInLoop(int line,
String label,
Class type,
String variable,
Block collection,
Block body)
{@code for (x in col) { ...
|
Block |
forLoop(String label,
Block e1,
Block e2,
Block e3,
Block body)
{@code for (e1; e2; e3) { ...
|
Block |
functionCall(int line,
Block lhs,
Block name,
boolean safe,
Block... argExps) |
Block |
functionCall(int line,
Block lhs,
String name,
Block... argExps)
LHS.name(...) |
Block |
greaterThan(int line,
Block lhs,
Block rhs) |
Block |
greaterThanEqual(int line,
Block lhs,
Block rhs) |
Block |
gstring(int line,
Block listOfValues,
Block listOfStrings)
"Foo bar zot ${x}" kind of string |
Block |
if_(Block cond,
Block then) |
Block |
if_(Block cond,
Block then,
Block els)
{@code if (...) { ...
|
Block |
instanceOf(int line,
Block value,
Block type) |
Block |
intdiv(int line,
Block lhs,
Block rhs) |
Block |
intdivEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
isCase(int line,
Block lhs,
Block rhs)
lhs in rhs |
Block |
javaThis_()
|
Block |
leftShift(int line,
Block lhs,
Block rhs)
lhs << rhs |
Block |
leftShiftEqual(int line,
LValueBlock lhs,
Block rhs)
lhs <<= rhs |
Block |
lessThan(int line,
Block lhs,
Block rhs) |
Block |
lessThanEqual(int line,
Block lhs,
Block rhs) |
Block |
list(Block... args)
[a,b,c,d] that creates a List. |
LValueBlock |
localVariable(int line,
String name) |
LValueBlock |
localVariable(String name) |
Block |
localVariableAssignOp(int line,
String name,
String operator,
Block rhs)
Assignment operator to a local variable, such as
x += 3 |
Block |
logicalAnd(int line,
Block lhs,
Block rhs)
lhs && rhs |
Block |
logicalOr(int line,
Block lhs,
Block rhs)
lhs || rhs |
Block |
map(Block... blocks)
Map literal:
[ a:b, c:d, e:f ] ...
We expect arguments to be multiple of two. |
Block |
map(List<Block> blocks) |
Block |
matchRegex(int line,
Block lhs,
Block rhs)
lhs ==~ rhs |
Block |
methodPointer(int line,
Block lhs,
Block methodName) |
Block |
minus(int line,
Block lhs,
Block rhs) |
Block |
minusEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
mod(int line,
Block lhs,
Block rhs) |
Block |
modEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
multiply(int line,
Block lhs,
Block rhs) |
Block |
multiplyEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
new_(int line,
Block type,
Block... argExps) |
Block |
new_(int line,
Class type,
Block... argExps)
Object instantiation.
|
Block |
newArray(int line,
Class type,
Block... argExps)
Array instantiation like
new String[1][5] |
Block |
newArrayFromInitializers(Block... args)
Array with initializers like
new Object[] {1, "two"} which exists in Java but not Groovy. |
Block |
noop() |
Block |
not(int line,
Block b)
!b |
Block |
null_() |
Block |
one() |
Block |
plus(int line,
Block lhs,
Block rhs) |
Block |
plusEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
postfixDec(int line,
LValueBlock body)
x-- |
Block |
postfixInc(int line,
LValueBlock body)
x++ |
Block |
power(int line,
Block lhs,
Block rhs) |
Block |
powerEqual(int line,
LValueBlock lhs,
Block rhs) |
Block |
prefixDec(int line,
LValueBlock body)
--x |
Block |
prefixInc(int line,
LValueBlock body)
++x |
LValueBlock |
property(int line,
Block lhs,
Block property,
boolean safe) |
LValueBlock |
property(int line,
Block lhs,
String property) |
Block |
range(int line,
Block from,
Block to,
boolean inclusive)
x..y or x..>y to create a range |
Block |
return_(Block exp)
return exp; |
Block |
rightShift(int line,
Block lhs,
Block rhs)
lhs >> rhs |
Block |
rightShiftEqual(int line,
LValueBlock lhs,
Block rhs)
lhs >>= rhs |
Block |
rightShiftUnsigned(int line,
Block lhs,
Block rhs)
lhs >>> rhs |
Block |
rightShiftUnsignedEqual(int line,
LValueBlock lhs,
Block rhs)
lhs >>>= rhs |
Block |
sandboxCast(int line,
Block block,
Class<?> type,
boolean ignoreAutoboxing,
boolean strict)
Deprecated.
Just for compatibility with old scripts; prefer
sandboxCastOrCoerce(int, com.cloudbees.groovy.cps.Block, java.lang.Class<?>, boolean, boolean, boolean) |
Block |
sandboxCastOrCoerce(int line,
Block block,
Class<?> type,
boolean ignoreAutoboxing,
boolean coerce,
boolean strict)
Cast to type when
CastExpression.isCoerce() from SandboxCpsTransformer. |
Block |
sequence(Block... bodies)
Like
block(Block...) but it doesn't create a new scope. |
Block |
sequence(Block b) |
Block |
sequence(Block exp1,
Block exp2) |
Block |
setLocalVariable(int line,
String name,
Block rhs) |
Block |
setProperty(int line,
Block lhs,
Block property,
Block rhs) |
Block |
setProperty(int line,
Block lhs,
String property,
Block rhs) |
Block |
staticCall(int line,
Class lhs,
String name,
Block... argExps) |
LValueBlock |
staticField(int line,
Class type,
String name) |
Block |
super_(Class senderType)
Block that's only valid as a LHS of a method call like
super.foo(...) |
Block |
switch_(String label,
Block switchExp,
Block defaultStmt,
CaseExpression... caseExps) |
Block |
ternaryOp(Block cond,
Block trueExp,
Block falseExp) |
Block |
this_() |
Block |
throw_(int line,
Block exp)
throw exp; |
Block |
true_() |
Block |
tryCatch(Block body,
Block finally_,
CatchExpression... catches) |
Block |
tryCatch(Block body,
List<CatchExpression> catches)
{@code
try {
...
|
Block |
tryCatch(Block body,
List<CatchExpression> catches,
Block finally_) |
Block |
two() |
Block |
unaryMinus(int line,
Block lhs) |
Block |
unaryPlus(int line,
Block lhs) |
Block |
while_(String label,
Block cond,
Block body) |
Object |
with(groovy.lang.Closure c)
Evaluate the given closure by passing this object as an argument.
|
Builder |
withClosureType(Class<? extends CpsClosure> t)
Overrides the actual instance type of
CpsClosure to be created. |
Block |
yield(Object o) |
Block |
zero() |
public Builder(MethodLocation loc)
public Builder withClosureType(Class<? extends CpsClosure> t)
CpsClosure to be created.public Builder contextualize(CallSiteTag... tags)
Builder that contextualizes call sites with the given tags.Invoker.contextualize(CallSiteBlock)public Object with(groovy.lang.Closure c)
public Block null_()
public Block noop()
public Block zero()
public Block one()
public Block two()
public Block true_()
public Block false_()
public Block sequence(Block... bodies)
block(Block...) but it doesn't create a new scope.public Block closure(int line, List<Class> parameterTypes, List<String> parameters, Block body)
public LValueBlock localVariable(String name)
public LValueBlock localVariable(int line, String name)
public Block this_()
public Block super_(Class senderType)
super.foo(...)public Block javaThis_()
public Block localVariableAssignOp(int line, String name, String operator, Block rhs)
x += 3public Block forLoop(String label, Block e1, Block e2, Block e3, Block body)
for (e1; e2; e3) { ... }public Block forInLoop(int line, String label, Class type, String variable, Block collection, Block body)
for (x in col) { ... }public Block tryCatch(Block body, Block finally_, CatchExpression... catches)
public Block tryCatch(Block body, List<CatchExpression> catches)
try {
...
} catch (T v) {
...
} catch (T v) {
...
}
public Block tryCatch(Block body, List<CatchExpression> catches, Block finally_)
public Block map(Block... blocks)
[ a:b, c:d, e:f ] ...
We expect arguments to be multiple of two.public Block plusEqual(int line, LValueBlock lhs, Block rhs)
public Block minusEqual(int line, LValueBlock lhs, Block rhs)
public Block multiplyEqual(int line, LValueBlock lhs, Block rhs)
public Block divEqual(int line, LValueBlock lhs, Block rhs)
public Block intdivEqual(int line, LValueBlock lhs, Block rhs)
public Block modEqual(int line, LValueBlock lhs, Block rhs)
public Block powerEqual(int line, LValueBlock lhs, Block rhs)
public Block leftShiftEqual(int line, LValueBlock lhs, Block rhs)
lhs <<= rhspublic Block rightShiftEqual(int line, LValueBlock lhs, Block rhs)
lhs >>= rhspublic Block rightShiftUnsignedEqual(int line, LValueBlock lhs, Block rhs)
lhs >>>= rhspublic Block bitwiseAndEqual(int line, LValueBlock lhs, Block rhs)
public Block bitwiseOrEqual(int line, LValueBlock lhs, Block rhs)
public Block bitwiseXorEqual(int line, LValueBlock lhs, Block rhs)
public Block prefixInc(int line, LValueBlock body)
++xpublic Block prefixDec(int line, LValueBlock body)
--xpublic Block postfixInc(int line, LValueBlock body)
x++public Block postfixDec(int line, LValueBlock body)
x--public Block cast(int line, Block block, Class type, boolean coerce)
coerce - True for exp as type cast. false for (type)exp cast.@Deprecated public Block sandboxCast(int line, Block block, Class<?> type, boolean ignoreAutoboxing, boolean strict)
sandboxCastOrCoerce(int, com.cloudbees.groovy.cps.Block, java.lang.Class<?>, boolean, boolean, boolean)public Block sandboxCastOrCoerce(int line, Block block, Class<?> type, boolean ignoreAutoboxing, boolean coerce, boolean strict)
CastExpression.isCoerce() from SandboxCpsTransformer.public Block functionCall(int line, Block lhs, String name, Block... argExps)
LHS.name(...)public Block functionCall(int line, Block lhs, Block name, boolean safe, Block... argExps)
public Block assign(int line, LValueBlock lhs, Block rhs)
public LValueBlock property(int line, Block lhs, String property)
public LValueBlock property(int line, Block lhs, Block property, boolean safe)
public LValueBlock array(int line, Block lhs, Block index)
public LValueBlock attribute(int line, Block lhs, Block property, boolean safe)
public LValueBlock staticField(int line, Class type, String name)
public Block newArray(int line, Class type, Block... argExps)
new String[1][5]public Block newArrayFromInitializers(Block... args)
new Object[] {1, "two"} which exists in Java but not Groovy.
Only used by CpsDefaultGroovyMethods and friends.public Block range(int line, Block from, Block to, boolean inclusive)
x..y or x..>y to create a rangepublic Block gstring(int line, Block listOfValues, Block listOfStrings)
"Foo bar zot ${x}" kind of stringpublic Block switch_(String label, Block switchExp, Block defaultStmt, CaseExpression... caseExps)
case_(int, Block, Block)public CaseExpression case_(int line, Block matcher, Block body)
Copyright © 2011–2019. All rights reserved.