io.vertx.codetrans.expression.LambdaExpressionModel Maven / Gradle / Ivy
package io.vertx.codetrans.expression;
import com.sun.source.tree.LambdaExpressionTree;
import io.vertx.codegen.type.TypeInfo;
import io.vertx.codetrans.CodeBuilder;
import io.vertx.codetrans.CodeModel;
import io.vertx.codetrans.CodeWriter;
import java.util.List;
/**
* @author Julien Viet
*/
public class LambdaExpressionModel extends ExpressionModel {
private final LambdaExpressionTree.BodyKind bodyKind;
private final List parameterTypes;
private final List parameterNames;
private final CodeModel body;
public LambdaExpressionModel(CodeBuilder builder, LambdaExpressionTree.BodyKind bodyKind, List parameterTypes, List parameterNames, CodeModel body) {
super(builder);
this.bodyKind = bodyKind;
this.parameterTypes = parameterTypes;
this.parameterNames = parameterNames;
this.body = body;
}
public LambdaExpressionTree.BodyKind getBodyKind() {
return bodyKind;
}
public List getParameterTypes() {
return parameterTypes;
}
public List getParameterNames() {
return parameterNames;
}
public CodeModel getBody() {
return body;
}
@Override
public void render(CodeWriter writer) {
writer.renderLambda(bodyKind, parameterTypes, parameterNames, body);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy