int noArgs=0;
for (final SequenceType argumentType : argumentTypes) {
if (argumentType instanceof FunctionParameterSequenceType) {
noArgs++;
final FunctionParameterSequenceType fp
= (FunctionParameterSequenceType) argumentType;
args.append("$");
args.append(fp.getAttributeName());
args.append(" : ");
args.append(fp.getDescription());
args.append("\n");
}
}
// only add if there were good arguments
if(noArgs>0){
description.append("Parameters:\n");
description.append(args);
}
}
final SequenceType returnType = signature.getReturnType();
if(returnType != null){
if (returnType instanceof FunctionReturnSequenceType) {
description.append("\n");
description.append("Returns ");
final FunctionReturnSequenceType fp
= (FunctionReturnSequenceType) returnType;
description.append(fp.getDescription());
description.append("\n");
}
}