Lines 468-480
Link Here
|
468 |
if (scope != null) { |
468 |
if (scope != null) { |
469 |
TypeDeclaration typeDecl = scope.referenceContext; |
469 |
TypeDeclaration typeDecl = scope.referenceContext; |
470 |
AbstractMethodDeclaration methodDecl = typeDecl.declarationOf(originalMethod); |
470 |
AbstractMethodDeclaration methodDecl = typeDecl.declarationOf(originalMethod); |
471 |
if (methodDecl != null) |
471 |
if (methodDecl != null) { |
472 |
ASTNode.resolveAnnotations(methodDecl.scope, methodDecl.annotations, originalMethod); |
472 |
ASTNode.resolveAnnotations(methodDecl.scope, methodDecl.annotations, originalMethod); |
|
|
473 |
if ((originalMethod.tagBits & TagBits.AnnotationDeprecated) != 0) |
474 |
originalMethod.modifiers |= ClassFileConstants.AccDeprecated; |
475 |
} |
473 |
} |
476 |
} |
474 |
} |
477 |
} |
475 |
return originalMethod.tagBits; |
478 |
return originalMethod.tagBits; |
476 |
} |
479 |
} |
477 |
|
480 |
|
|
|
481 |
|
482 |
|
483 |
/** |
484 |
* @see org.eclipse.jdt.internal.compiler.lookup.Binding#initializeDeprecatedAnnotationTagBits() |
485 |
*/ |
486 |
public void initializeDeprecatedAnnotationTagBits() { |
487 |
MethodBinding originalMethod = original(); |
488 |
if ((originalMethod.tagBits & TagBits.DeprecatedAnnotationResolved) == 0 && originalMethod.declaringClass instanceof SourceTypeBinding) { |
489 |
ClassScope scope = ((SourceTypeBinding) originalMethod.declaringClass).scope; |
490 |
if (scope != null) { |
491 |
TypeDeclaration typeDecl = scope.referenceContext; |
492 |
AbstractMethodDeclaration methodDecl = typeDecl.declarationOf(originalMethod); |
493 |
if (methodDecl != null) |
494 |
ASTNode.resolveDeprecatedAnnotations(methodDecl.scope, methodDecl.annotations, originalMethod); |
495 |
originalMethod.tagBits |= TagBits.DeprecatedAnnotationResolved; |
496 |
} |
497 |
if ((originalMethod.tagBits & TagBits.AnnotationDeprecated) != 0) |
498 |
originalMethod.modifiers |= ClassFileConstants.AccDeprecated; |
499 |
} |
500 |
} |
501 |
|
478 |
/** |
502 |
/** |
479 |
* @return the default value for this annotation method or <code>null</code> if there is no default value |
503 |
* @return the default value for this annotation method or <code>null</code> if there is no default value |
480 |
*/ |
504 |
*/ |
Lines 776-782
Link Here
|
776 |
/* Answer true if the receiver's declaring type is deprecated (or any of its enclosing types) |
800 |
/* Answer true if the receiver's declaring type is deprecated (or any of its enclosing types) |
777 |
*/ |
801 |
*/ |
778 |
public final boolean isViewedAsDeprecated() { |
802 |
public final boolean isViewedAsDeprecated() { |
779 |
return (this.modifiers & (ClassFileConstants.AccDeprecated | ExtraCompilerModifiers.AccDeprecatedImplicitly)) != 0; |
803 |
if ((this.modifiers & (ClassFileConstants.AccDeprecated | ExtraCompilerModifiers.AccDeprecatedImplicitly)) != 0) |
|
|
804 |
return true; |
805 |
if (this.declaringClass != null) { |
806 |
this.declaringClass.initializeDeprecatedAnnotationTagBits(); |
807 |
return this.declaringClass.isViewedAsDeprecated(); |
808 |
} |
809 |
return false; |
780 |
} |
810 |
} |
781 |
|
811 |
|
782 |
public final int kind() { |
812 |
public final int kind() { |