*/
public static ICompilerProblem createDeprecationProblem(IDefinition definition, IASNode site)
{
ICompilerProblem problem = null;
IDeprecationInfo deprecationInfo = definition.getDeprecationInfo();
String message = deprecationInfo.getMessage();
if (message != null)
{
problem = new DeprecatedAPIWithMessageProblem(site, message);
}
else
{
String name = definition.getBaseName();
String since = deprecationInfo.getSince();
String replacement = deprecationInfo.getReplacement();
if (since == null && replacement == null)
problem = new DeprecatedAPIProblem(site, name);
else if (since != null && replacement == null)