package io.vertx.codegen.overloadcheck;
import java.util.Arrays;
import java.util.List;
public class SimpleMethod {
public final String name;
public final List<SimpleParam> params;
public SimpleMethod(String name, SimpleParam... params) {
this.name = name;
this.params = Arrays.asList(params);
}
public SimpleMethod(String name, List<SimpleParam> params) {
this.name = name;
this.params = params;
}
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append(name).append("(");
int count = 0;
for (SimpleParam param: params) {
builder.append(param.typeName).append(" ").append(param.name);
if (++count != params.size()) {
builder.append(", ");
}
}
builder.append(")");
return builder.toString();
}
}