Package org.jboss.jdeparser
Interface JLambda
- All Superinterfaces:
JExpr
- All Known Implementing Classes:
JLambdaImpl
A Java 8 lambda.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionbody()
Get the lambda body as a block.Set the lambda body as an expression.Add a declared-type parameter to this lambda.Add an inferred-type parameter to this lambda.Add a declared-type parameter to this lambda.Add a declared-type parameter to this lambda.Methods inherited from interface org.jboss.jdeparser.JExpr
_instanceof, _instanceof, _instanceof, _new, _new, _new, _newAnon, _newAnon, _newAnon, $v, and, band, bor, bxor, call, cast, cast, cast, comp, cond, div, eq, field, ge, gt, idx, idx, le, length, lshr, lt, minus, mod, ne, neg, not, or, paren, plus, shl, shr, times
-
Method Details
-
param
Add a declared-type parameter to this lambda.- Parameters:
type
- the parameter typename
- the parameter name- Returns:
- this lambda
-
param
Add a declared-type parameter to this lambda.- Parameters:
typeName
- the parameter type namename
- the parameter name- Returns:
- this lambda
-
param
Add a declared-type parameter to this lambda.- Parameters:
type
- the parameter typename
- the parameter name- Returns:
- this lambda
-
param
Add an inferred-type parameter to this lambda. If one parameter is inferred, all will be, despite any declared parameter type.- Parameters:
name
- the parameter name- Returns:
- this lambda
-
body
JBlock body()Get the lambda body as a block. Clears any expression body.- Returns:
- the lambda body
-
body
Set the lambda body as an expression. Clears any block body or previously set expression body.- Parameters:
expr
- the expression body of this lambda- Returns:
- this lambda
-