@Override public int hashCode() { int result = (isConstant() ? 1 : 0); result = 31 * result + (getInputs() != null ? getInputs().hashCode() : 0); result = 31 * result + (getName() != null ? getName().hashCode() : 0); result = 31 * result + (getOutputs() != null ? getOutputs().hashCode() : 0); result = 31 * result + (getType() != null ? getType().hashCode() : 0); result = 31 * result + (isPayable() ? 1 : 0); result = 31 * result + (getStateMutability() != null ? getStateMutability().hashCode() : 0); return result; }
MethodSpec buildFunction( AbiDefinition functionDefinition) throws ClassNotFoundException { String functionName = functionDefinition.getName(); // If the solidity function name is a reserved word // in the current java version prepend it with "_" if (!SourceVersion.isName(functionName)) { functionName = "_" + functionName; } MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder(functionName) .addModifiers(Modifier.PUBLIC); String inputParams = addParameters(methodBuilder, functionDefinition.getInputs()); List<TypeName> outputParameterTypes = buildTypeNames(functionDefinition.getOutputs()); if (functionDefinition.isConstant()) { buildConstantFunction( functionDefinition, methodBuilder, outputParameterTypes, inputParams); } else { buildTransactionFunction( functionDefinition, methodBuilder, inputParams); } return methodBuilder.build(); }
return false; if (getOutputs() != null ? !getOutputs().equals(that.getOutputs()) : that.getOutputs() != null) { return false;
MethodSpec buildFunction( AbiDefinition functionDefinition) throws ClassNotFoundException { String functionName = functionDefinition.getName(); // If the solidity function name is a reserved word // in the current java version prepend it with "_" if (!SourceVersion.isName(functionName)) { functionName = "_" + functionName; } MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder(functionName) .addModifiers(Modifier.PUBLIC); String inputParams = addParameters(methodBuilder, functionDefinition.getInputs()); List<TypeName> outputParameterTypes = buildTypeNames(functionDefinition.getOutputs()); if (functionDefinition.isConstant()) { buildConstantFunction( functionDefinition, methodBuilder, outputParameterTypes, inputParams); } else { buildTransactionFunction( functionDefinition, methodBuilder, inputParams); } return methodBuilder.build(); }