if (annotations != null) {
int length;
if ((length = annotations.length) >= 0) {
switch (kind) {
case Binding.PACKAGE :
PackageBinding packageBinding = (PackageBinding) recipient;
if ((packageBinding.tagBits & TagBits.DeprecatedAnnotationResolved) != 0) return;
break;
case Binding.TYPE :
case Binding.GENERIC_TYPE :
ReferenceBinding type = (ReferenceBinding) recipient;
if ((type.tagBits & TagBits.DeprecatedAnnotationResolved) != 0) return;
break;
case Binding.METHOD :
MethodBinding method = (MethodBinding) recipient;
if ((method.tagBits & TagBits.DeprecatedAnnotationResolved) != 0) return;
break;
case Binding.FIELD :
FieldBinding field = (FieldBinding) recipient;
if ((field.tagBits & TagBits.DeprecatedAnnotationResolved) != 0) return;
break;
case Binding.LOCAL :
LocalVariableBinding local = (LocalVariableBinding) recipient;
if ((local.tagBits & TagBits.DeprecatedAnnotationResolved) != 0) return;
break;
default :
return;
}
for (int i = 0; i < length; i++) {
TypeReference annotationTypeRef = annotations[i].type;
// only resolve type name if 'Deprecated' last token
if (!CharOperation.equals(TypeConstants.JAVA_LANG_DEPRECATED[2], annotationTypeRef.getLastToken())) continue;
TypeBinding annotationType = annotations[i].type.resolveType(scope);
if(annotationType != null && annotationType.isValidBinding() && annotationType.id == TypeIds.T_JavaLangDeprecated) {
switch (kind) {
case Binding.PACKAGE :
PackageBinding packageBinding = (PackageBinding) recipient;
packageBinding.tagBits |= (TagBits.AnnotationDeprecated | TagBits.DeprecatedAnnotationResolved);
return;
case Binding.TYPE :
case Binding.GENERIC_TYPE :
case Binding.TYPE_PARAMETER :
ReferenceBinding type = (ReferenceBinding) recipient;
type.tagBits |= (TagBits.AnnotationDeprecated | TagBits.DeprecatedAnnotationResolved);
return;
case Binding.METHOD :
MethodBinding method = (MethodBinding) recipient;
method.tagBits |= (TagBits.AnnotationDeprecated | TagBits.DeprecatedAnnotationResolved);
return;
case Binding.FIELD :
FieldBinding field = (FieldBinding) recipient;
field.tagBits |= (TagBits.AnnotationDeprecated | TagBits.DeprecatedAnnotationResolved);
return;
case Binding.LOCAL :
LocalVariableBinding local = (LocalVariableBinding) recipient;
local.tagBits |= (TagBits.AnnotationDeprecated | TagBits.DeprecatedAnnotationResolved);
return;
default:
return;
}
}
}
}
}
switch (kind) {
case Binding.PACKAGE :
PackageBinding packageBinding = (PackageBinding) recipient;
packageBinding.tagBits |= TagBits.DeprecatedAnnotationResolved;
return;
case Binding.TYPE :
case Binding.GENERIC_TYPE :
case Binding.TYPE_PARAMETER :