io.vertx.codetrans.expression.ArraysModel Maven / Gradle / Ivy
package io.vertx.codetrans.expression;
import io.vertx.codegen.type.TypeInfo;
import io.vertx.codetrans.CodeBuilder;
import io.vertx.codetrans.MethodSignature;
import io.vertx.codetrans.TypeArg;
import java.util.List;
/**
* @author Julien Viet
*/
public class ArraysModel extends ClassModel {
public ArraysModel(CodeBuilder builder) {
super(builder);
}
@Override
public ExpressionModel onMethodInvocation(TypeInfo receiverType, MethodSignature method, TypeInfo returnType, List typeArguments, List arguments, List argumentTypes) {
if (method.getName().equals("asList")) {
return builder.render(writer -> {
writer.renderListLiteral(arguments);
});
}
return super.onMethodInvocation(receiverType, method, returnType, typeArguments, arguments, argumentTypes);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy