anchor.diff:           };''';
   
           return '''
  -class _\$${name}Serializer implements PrimitiveSerializer<$genericName> {
  +class $serializerImplName implements PrimitiveSerializer<$genericName> {
     $toWire
     $fromWire
   
  
positive.code:         .join('\n');
    }
  
    String generateSerializerDeclaration() {
      var camelCaseName = _toCamelCase(name);
      return 'Serializer<$genericName> '
          '_\$${camelCaseName}Serializer = '
          'new _\$${name}Serializer();';
    }
  
    String generateSerializer() {
      if (isBuiltValue) {
        return '''
  class _\$${name}Serializer implements StructuredSerializer<$genericName> {
    @override
    final Iterable<Type> types = const [$name, _\$$name];
    @override
    final String wireName = '${escapeString(wireName)}';
  
  
negative.code:   CompilationUnitElement get compilationUnit =>
        element.library.definingCompilationUnit;
  
    /// Returns the serializer class name for the generated implementation. If the manually
    /// maintained class is private then we ignore the underscore here, to avoid
    /// returning a class name starting `_$_`.
    @memoized
    String get serializerImplName {
      final unhidden = name.startsWith('_') ? name.substring(1) : name;
      return '_\$${unhidden}Serializer';
    }
  
    /// Returns the serializer instance name for the generated implementation,
    /// referenced by the user as a `static serializer` attribute.
    ///
    /// If the manually maintained class is private then we ignore the underscore here, to avoid
    /// returning a class name starting `_$_`.
    @memoized
    String get serializerInstanceName {
      final unhidden = name.startsWith('_') ? name.substring(1) : name;
      final camelCaseName =
          unhidden.substring(0, 1).toLowerCase() + unhidden.substring(1);
      return '_\$${camelCaseName}Serializer';
    }
  
    Iterable<String> computeErrors() {
      var result = <String>[];
  
      if (!serializerSettings.custom) {
        final expectedSerializerDeclaration =
            'static Serializer<$genericName> get serializer => ${serializerInstanceName};';
        // We used to recommend raw types; recommend the full type now, but still
        // allow raw types.
        final expectedSerializerDeclarationRaw =
            'static Serializer<$name> get serializer => ${serializerInstanceName};';
        if (serializerDeclaration != expectedSerializerDeclaration &&
            serializerDeclaration != expectedSerializerDeclarationRaw) {
          result.add('Declare $name.serializer as: '
  