toMap method

Map<String, Object> toMap()

Converts a JavaOptions to a Map representation where: x = JavaOptions.fromMap(x.toMap()).

Implementation

Map<String, Object> toMap() {
  final Map<String, Object> result = <String, Object>{
    if (className != null) 'className': className!,
    if (package != null) 'package': package!,
    if (copyrightHeader != null) 'copyrightHeader': copyrightHeader!,
    if (useGeneratedAnnotation != null)
      'useGeneratedAnnotation': useGeneratedAnnotation!,
  };
  return result;
}