&& !this.referenceBinding.isMemberType()) {
// add enclosing method attribute (1.5 mode only)
attributesNumber += generateEnclosingMethodAttribute();
}
if (this.targetJDK >= ClassFileConstants.JDK1_4) {
TypeDeclaration typeDeclaration = this.referenceBinding.scope.referenceContext;
if (typeDeclaration != null) {
final Annotation[] annotations = typeDeclaration.annotations;
if (annotations != null) {
long targetMask;
if (typeDeclaration.isPackageInfo())
targetMask = TagBits.AnnotationForPackage;
else if (this.referenceBinding.isAnnotationType())
targetMask = TagBits.AnnotationForType | TagBits.AnnotationForAnnotationType;
else
targetMask = TagBits.AnnotationForType | TagBits.AnnotationForTypeUse;