instanceMethodInterfaces method

List<CodeUnit> instanceMethodInterfaces()

Implementation

List<CodeUnit> instanceMethodInterfaces() {
  final result = <CodeUnit>[];

  for (final method in instanceMethods) {
    if (method.name == className) {
      continue;
    }

    if (method.codeComments.isNotEmpty) {
      result.add(Comment(
          comments: [...method.codeComments],
          commentType: CommentType.commentBlock));
    }

    result.add(OCFunction(
        isDeclaration: true,
        depth: depth,
        functionName: method.name,
        isInstanceMethod: true,
        returnType: method.returnType,
        params: method.parameters));
  }

  return result;
}