Package org.jboss.jdeparser
Interface JLambda
-
- All Superinterfaces:
JExpr
public interface JLambda extends JExpr
A Java 8 lambda.- Author:
- David M. Lloyd
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description JBlock
body()
Get the lambda body as a block.JLambda
body(JExpr expr)
Set the lambda body as an expression.JLambda
param(java.lang.Class<?> type, java.lang.String name)
Add a declared-type parameter to this lambda.JLambda
param(java.lang.String name)
Add an inferred-type parameter to this lambda.JLambda
param(java.lang.String typeName, java.lang.String name)
Add a declared-type parameter to this lambda.JLambda
param(JType type, java.lang.String name)
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 Detail
-
param
JLambda param(JType type, java.lang.String name)
Add a declared-type parameter to this lambda.- Parameters:
type
- the parameter typename
- the parameter name- Returns:
- this lambda
-
param
JLambda param(java.lang.String typeName, java.lang.String name)
Add a declared-type parameter to this lambda.- Parameters:
typeName
- the parameter type namename
- the parameter name- Returns:
- this lambda
-
param
JLambda param(java.lang.Class<?> type, java.lang.String name)
Add a declared-type parameter to this lambda.- Parameters:
type
- the parameter typename
- the parameter name- Returns:
- this lambda
-
param
JLambda param(java.lang.String name)
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
-
-