Map<String, dynamic> toJson() { return { 'name': name, 'file': file, 'method_count': methodCount, 'methods': methods.map((m) => m.toJson()).toList(), }; }