build method

  1. @override
String build()
override

Implementation

@override
String build() {
  assert((isPublic && isPrivate) == false);

  final sb = StringBuffer();

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

  sb.write(field.type.javaType() + keywordSpace); //fixme
  sb.write('${field.name};'); // fixme
  if (field.codeComments.isNotEmpty) {
    sb.write('$keywordSpace//${field.codeComments.join(',')}');
  }

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