functionSignature method

String functionSignature()

Implementation

String functionSignature() {
  assert((isPublic && isPrivate) == false);

  final sb = StringBuffer();

  if (isPublic) {
    sb.write(keywordPublic + keywordSpace);
  }
  if (isPrivate) {
    sb.write(keywordPrivate + keywordSpace);
  }
  if (isStatic) {
    sb.write(keywordStatic + keywordSpace);
  }

  if (!isConstruct) {
    sb.write(returnType.javaType() + keywordSpace);
  }

  sb.write(functionName);
  sb.write(keywordParenthesesLeft);
  sb.write(params.map((e) => '${e.type.javaType()} ${e.name}').join(', '));
  sb.write(keywordParenthesesRight);

  return sb.toString();
}