Example usage for org.eclipse.jdt.internal.compiler.lookup TagBits AnnotationResolved

List of usage examples for org.eclipse.jdt.internal.compiler.lookup TagBits AnnotationResolved

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.lookup TagBits AnnotationResolved.

Prototype

long AnnotationResolved

To view the source code for org.eclipse.jdt.internal.compiler.lookup TagBits AnnotationResolved.

Click Source Link

Usage

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

License:Open Source License

/**
 * Compute the tagbits for standard annotations. For source types, these could require
 * lazily resolving corresponding annotation nodes, in case of forward references.
 * @see org.eclipse.jdt.internal.compiler.lookup.Binding#getAnnotationTagBits()
 *///  w ww. j  ava  2 s .c om
public long getAnnotationTagBits() {
    if ((this.tagBits & TagBits.AnnotationResolved) == 0 && this.scope != null) {
        TypeDeclaration typeDecl = this.scope.referenceContext;
        boolean old = typeDecl.staticInitializerScope.insideTypeAnnotation;
        try {
            typeDecl.staticInitializerScope.insideTypeAnnotation = true;
            ASTNode.resolveAnnotations(typeDecl.staticInitializerScope, typeDecl.annotations, this);
        } finally {
            typeDecl.staticInitializerScope.insideTypeAnnotation = old;
        }
        if ((this.tagBits & TagBits.AnnotationDeprecated) != 0)
            this.modifiers |= ClassFileConstants.AccDeprecated;
    }
    return this.tagBits;
}