io.vertx.codetrans.MethodSignature Maven / Gradle / Ivy
package io.vertx.codetrans;
import io.vertx.codegen.type.TypeInfo;
import java.util.List;
/**
* @author Julien Viet
*/
public class MethodSignature {
final String name;
final List parameterTypes;
final boolean varargs;
final TypeInfo returnType;
public MethodSignature(String name, List parameterTypes, boolean varargs, TypeInfo returnType) {
this.name = name;
this.parameterTypes = parameterTypes;
this.varargs = varargs;
this.returnType = returnType;
}
public String getName() {
return name;
}
public List getParameterTypes() {
return parameterTypes;
}
public TypeInfo getReturnType() {
return returnType;
}
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (obj instanceof MethodSignature) {
MethodSignature that = (MethodSignature) obj;
return name.equals(that.name) && parameterTypes.equals(that.parameterTypes) && varargs == that.varargs;
}
return false;
}
@Override
public int hashCode() {
return name.hashCode() + 31 * (parameterTypes.hashCode() + (31 * (varargs ? 1 : 0)));
}
@Override
public String toString() {
return "MethodSignature[name=" + name + ",parameters=" + parameterTypes + ",varargs=" + varargs + "]";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy