getterAndSetters method

List<CodeUnit> getterAndSetters()

Implementation

List<CodeUnit> getterAndSetters() {
  final lines = <CodeUnit>[];
  for (final field in fieldGettersAndSetters) {
    lines.add(JavaFunctionGetter(field, depth: depth + 1));
    lines.add(EmptyLine());
    lines.add(JavaFunctionSetter(field, depth: depth + 1));
    lines.add(EmptyLine());
  }

  return lines;
}