Example usage for org.eclipse.jdt.internal.compiler.lookup AnnotationHolder AnnotationHolder

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

Introduction

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

Prototype

AnnotationHolder

Source Link

Usage

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

License:Open Source License

void storeAnnotations(Binding binding, AnnotationBinding[] annotations) {
    AnnotationHolder holder = null;/*from   w w  w  . j  a v a 2  s .c  om*/
    if (annotations == null || annotations.length == 0) {
        SimpleLookupTable store = storedAnnotations(false);
        if (store != null)
            holder = (AnnotationHolder) store.get(binding);
        if (holder == null)
            return; // nothing to delete
    } else {
        SimpleLookupTable store = storedAnnotations(true);
        if (store == null)
            return; // not supported
        holder = (AnnotationHolder) store.get(binding);
        if (holder == null)
            holder = new AnnotationHolder();
    }
    storeAnnotationHolder(binding, holder.setAnnotations(annotations));
}