Package org.jboss.jdeparser
Class JLambdaImpl
- java.lang.Object
-
- org.jboss.jdeparser.AbstractJExpr
-
- org.jboss.jdeparser.JLambdaImpl
-
class JLambdaImpl extends AbstractJExpr implements JLambda
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
JLambdaImpl.Param
-
Field Summary
Fields Modifier and Type Field Description private BasicJBlock
blockBody
private AbstractJExpr
exprBody
private boolean
hasInferred
private java.util.ArrayList<JLambdaImpl.Param>
params
-
Constructor Summary
Constructors Constructor Description JLambdaImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JBlock
body()
Get the lambda body as a block.JLambda
body(JExpr expression)
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.void
write(SourceFileWriter writer)
-
Methods inherited from class org.jboss.jdeparser.AbstractJExpr
_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, of, or, paren, plus, prec, shl, shr, times
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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
-
-
-
-
Field Detail
-
blockBody
private BasicJBlock blockBody
-
exprBody
private AbstractJExpr exprBody
-
hasInferred
private boolean hasInferred
-
params
private java.util.ArrayList<JLambdaImpl.Param> params
-
-
Method Detail
-
param
public JLambda param(JType type, java.lang.String name)
Description copied from interface:JLambda
Add a declared-type parameter to this lambda.
-
param
public JLambda param(java.lang.String typeName, java.lang.String name)
Description copied from interface:JLambda
Add a declared-type parameter to this lambda.
-
param
public JLambda param(java.lang.Class<?> type, java.lang.String name)
Description copied from interface:JLambda
Add a declared-type parameter to this lambda.
-
param
public JLambda param(java.lang.String name)
Description copied from interface:JLambda
Add an inferred-type parameter to this lambda. If one parameter is inferred, all will be, despite any declared parameter type.
-
body
public JBlock body()
Description copied from interface:JLambda
Get the lambda body as a block. Clears any expression body.
-
body
public JLambda body(JExpr expression)
Description copied from interface:JLambda
Set the lambda body as an expression. Clears any block body or previously set expression body.
-
write
public void write(SourceFileWriter writer) throws java.io.IOException
-
-