2358 tree.packageAnnotations), |
2358 tree.packageAnnotations), |
2359 name, List.<JCTypeParameter>nil(), |
2359 name, List.<JCTypeParameter>nil(), |
2360 null, List.<JCExpression>nil(), List.<JCTree>nil()); |
2360 null, List.<JCExpression>nil(), List.<JCTree>nil()); |
2361 ClassSymbol c = tree.packge.package_info; |
2361 ClassSymbol c = tree.packge.package_info; |
2362 c.flags_field |= flags; |
2362 c.flags_field |= flags; |
2363 c.annotations.setAttributes(tree.packge.annotations); |
2363 c.setAttributes(tree.packge); |
2364 ClassType ctype = (ClassType) c.type; |
2364 ClassType ctype = (ClassType) c.type; |
2365 ctype.supertype_field = syms.objectType; |
2365 ctype.supertype_field = syms.objectType; |
2366 ctype.interfaces_field = List.nil(); |
2366 ctype.interfaces_field = List.nil(); |
2367 packageAnnotationsClass.sym = c; |
2367 packageAnnotationsClass.sym = c; |
2368 |
2368 |
2376 return true; |
2376 return true; |
2377 case LEGACY: |
2377 case LEGACY: |
2378 return tree.packageAnnotations.nonEmpty(); |
2378 return tree.packageAnnotations.nonEmpty(); |
2379 case NONEMPTY: |
2379 case NONEMPTY: |
2380 for (Attribute.Compound a : |
2380 for (Attribute.Compound a : |
2381 tree.packge.annotations.getDeclarationAttributes()) { |
2381 tree.packge.getDeclarationAttributes()) { |
2382 Attribute.RetentionPolicy p = types.getRetention(a); |
2382 Attribute.RetentionPolicy p = types.getRetention(a); |
2383 if (p != Attribute.RetentionPolicy.SOURCE) |
2383 if (p != Attribute.RetentionPolicy.SOURCE) |
2384 return true; |
2384 return true; |
2385 } |
2385 } |
2386 return false; |
2386 return false; |