build method

  1. @override
String build()
override

Implementation

@override
String build() {
  assert(isProtocol || isInterface);
  assert(!(isProtocol && isInterface));
  return CodeUnit.join([
    classSignature(),
    EmptyLine(),
    ...ocFields(),
    EmptyLine(),
    if (classMethods.isNotEmpty) ...[...classMethodInterfaces(), EmptyLine()],
    if (instanceMethods.isNotEmpty) ...[
      ...instanceMethodInterfaces(),
      EmptyLine()
    ],
    OneLine(depth: depth, body: '@end')
  ]);
}