anchor.diff:    FreeAndNil(FInternalMap);
   
     inherited Destroy;
  +end;
  +
  +procedure TDefaultsMap.AddValue(DefValAttribClass : TDefaultValueAttributeClass; Value : TValue);
  +begin
  +  FInternalMap.Add(DefValAttribClass, Value);
   end;
   
   class procedure TDefaultsMap.FreeStaticInstance;
  
positive.code:   Result := FInternalMap.ContainsKey(DefValAttribClass);
  end;
  
  { TDefaultValueAttribute }
  
  constructor TDefaultValueAttribute.Create(AValueType : TDefaultValueKind);
  begin
    inherited Create;
  
    FValueType := AValueType;
  end;
  
  function TDefaultValueAttribute.GetClassType : TDefaultValueAttributeClass;
  begin
    Pointer(Result) := PPointer(Self)^;
  end;
  
  { TDefaultValueAttribute<T> }
  
  constructor TDefaultValueAttribute<T>.Create(const AValue : T);
  begin
    inherited Create(dvkData);
  
    FValue := AValue;
  end;
  
  constructor TDefaultValueAttribute<T>.Create;
  begin
    inherited Create(dvkCalculated);
  end;
  
  function TDefaultValueAttribute<T>.CalculateValue : T;
    var
      V : TValue;
  begin
    with TDefaultsMap.StaticInstance do
      if HasValue(Self.GetClassType) then
        V := GetValue(Self.GetClassType)
      else
        V := TValue.Empty;
  
    Result := V.AsType<T>;
  end;
  
  function TDefaultValueAttribute<T>.GetValue : T;
  begin
    Result := Default(T);
  
    case ValueKind of
      dvkData:
        Result := FValue;
      dvkCalculated:
        Result := CalculateValue;
    else
      Assert(False, 'Unhandled default value kind while getting value.');
    end;
  end;
  
  initialization
    TDefaultsMap.GetStaticInstance;
  
  
negative.code: 
  type
  
    TDefaultValueAttributeClass = class of TDefaultValueAttribute;
  
    TDefaultValueAttribute = class abstract (TCustomAttribute)
      strict private
        FValueKind : TDefaultValueKind;
      private
        function GetClassType : TDefaultValueAttributeClass;
        function GetValue : TValue;
      strict protected
        FValue : TValue;
      protected
        constructor Create(AValueKind : TDefaultValueKind);
  
        function CalculateValue : TValue; virtual;
      public
        property Value : TValue read GetValue;
        property ValueKind : TDefaultValueKind read FValueKind;
    end;
  
    TDefaultValueAttribute<T> = class abstract (TDefaultValueAttribute)
      protected
        function MakeValue(const AValue : T) : TValue; virtual;
      public
        constructor Create(const AValue : T); overload;
        constructor Create; overload;
    end;
  
    TDefaultsMap = class
  