classSignature method

OneLine classSignature()

Implementation

OneLine classSignature() {
  final sb = StringBuffer();
  if (isPublic) {
    sb.write(keywordPublic + keywordSpace);
  }
  if (isStatic) {
    sb.write(keywordStatic + keywordSpace);
  }
  sb.write(isInterface ? keywordInterface : keywordClass);
  sb.write(keywordSpace);
  sb.write(className);
  if (generics.isNotEmpty) {
    sb.write('<${generics.join(', ')}>');
  }
  sb.write(keywordSpace);
  if (parentClass != null) {
    sb.write(keywordExtends + keywordSpace + parentClass! + keywordSpace);
  }
  sb.write(keywordBraceLeft);

  return OneLine(depth: depth, body: sb.toString());
}