public static String getTypeName(BType[] parameterType, BType[] returnParameterType) { return "function (" + (parameterType != null ? getBTypeListAsString(parameterType) : "") + ")" + (returnParameterType != null ? " returns (" + getBTypeListAsString(returnParameterType) + ")" : ""); }
@Override public String toString() { return getTypeName(paramTypes, retParamTypes); }
@Override public BType getFunctionType(List<BType> funcParams, BType retType) { BType[] returnTypes; if (retType == null) { returnTypes = new BType[0]; } else { returnTypes = new BType[]{retType}; } return new BFunctionType(funcParams.toArray(new BType[funcParams.size()]), returnTypes); }