-
Notifications
You must be signed in to change notification settings - Fork 35
Closed
Labels
Description
I need to generate this field signature:
public final StringFilter<E> firstName = this.andThen(Person::getFirstName)::apply;
I can easily generate the this.andThen(Person::getFirstName)
part with:
JLambdaMethodRef lambdaMethod = new JLambdaMethodRef(personType, getterName);
JInvocation jInvocation = JExpr._this().invoke("andThen").arg(lambdaMethod);
but I can't generate a lambda method reference from this JInvocation
, since I can't construct a new JLambdaMethodRef(jInvocation, "apply")
nor I can generate a lambda reference with any JInvocation
method, e.g. jInvocation.ref("apply")
generates .apply
instead of ::apply
.