Example usage for org.eclipse.jdt.internal.compiler.ast ASTNode resolveDeprecatedAnnotations

List of usage examples for org.eclipse.jdt.internal.compiler.ast ASTNode resolveDeprecatedAnnotations

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.ast ASTNode resolveDeprecatedAnnotations.

Prototype

public static void resolveDeprecatedAnnotations(BlockScope scope, Annotation[] annotations, Binding recipient) 

Source Link

Document

Figures if @Deprecated annotation is specified, do not resolve entire annotations.

Usage

From source file:org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.java

License:Open Source License

/**
 * @see org.eclipse.jdt.internal.compiler.lookup.Binding#initializeDeprecatedAnnotationTagBits()
 *///from  www.ja v  a  2  s .c om
public void initializeDeprecatedAnnotationTagBits() {
    if ((this.tagBits & TagBits.DeprecatedAnnotationResolved) == 0) {
        TypeDeclaration typeDecl = this.scope.referenceContext;
        boolean old = typeDecl.staticInitializerScope.insideTypeAnnotation;
        try {
            typeDecl.staticInitializerScope.insideTypeAnnotation = true;
            ASTNode.resolveDeprecatedAnnotations(typeDecl.staticInitializerScope, typeDecl.annotations, this);
            this.tagBits |= TagBits.DeprecatedAnnotationResolved;
        } finally {
            typeDecl.staticInitializerScope.insideTypeAnnotation = old;
        }
        if ((this.tagBits & TagBits.AnnotationDeprecated) != 0) {
            this.modifiers |= ClassFileConstants.AccDeprecated;
        }
    }
}