ActionScript has an attribute that allows marking fields/classes/functions as deprecated:
I want to deprecate some fields/classes/functions, without showing the deprecation warnings against myself, in my own code.
package com.ClientModels
{
public class SteamIdPair
{
[Deprecated(replacement="SteamStringId")]
public var SteamId:Number;
public var SteamStringId:String;
public var Id:String;
public function SteamIdPair(data:Object=null)
{
if(data == null)
return;
SteamId = data.SteamId; // I want to hide the deprecation warning on this line (only)
SteamStringId = data.SteamStringId;
Id = data.Id;
}
}
}
Basically, I want my users to see that SteamId:Number is deprecated when THEY use it, but not when I use it in my sdk code. Thus, I can't globally disable deprecation warnings via "show-deprecation-warnings = false"
How do I mark something as deprecated without spamming my users with all the subsequent-warnings within in MY code?