langtools/src/share/classes/com/sun/tools/javac/comp/Lower.java
changeset 13689 4d519199a6aa
parent 13633 0ea4283af723
child 13844 56339cf983a3
equal deleted inserted replaced
13636:bee2d435e11f 13689:4d519199a6aa
  2255                                                tree.packageAnnotations),
  2255                                                tree.packageAnnotations),
  2256                                 name, List.<JCTypeParameter>nil(),
  2256                                 name, List.<JCTypeParameter>nil(),
  2257                                 null, List.<JCExpression>nil(), List.<JCTree>nil());
  2257                                 null, List.<JCExpression>nil(), List.<JCTree>nil());
  2258             ClassSymbol c = tree.packge.package_info;
  2258             ClassSymbol c = tree.packge.package_info;
  2259             c.flags_field |= flags;
  2259             c.flags_field |= flags;
  2260             c.attributes_field = tree.packge.attributes_field;
  2260             c.annotations.setAttributes(tree.packge.annotations);
  2261             ClassType ctype = (ClassType) c.type;
  2261             ClassType ctype = (ClassType) c.type;
  2262             ctype.supertype_field = syms.objectType;
  2262             ctype.supertype_field = syms.objectType;
  2263             ctype.interfaces_field = List.nil();
  2263             ctype.interfaces_field = List.nil();
  2264             packageAnnotationsClass.sym = c;
  2264             packageAnnotationsClass.sym = c;
  2265 
  2265 
  2272             case ALWAYS:
  2272             case ALWAYS:
  2273                 return true;
  2273                 return true;
  2274             case LEGACY:
  2274             case LEGACY:
  2275                 return tree.packageAnnotations.nonEmpty();
  2275                 return tree.packageAnnotations.nonEmpty();
  2276             case NONEMPTY:
  2276             case NONEMPTY:
  2277                 for (Attribute.Compound a: tree.packge.attributes_field) {
  2277                 for (Attribute.Compound a :
       
  2278                          tree.packge.annotations.getAttributes()) {
  2278                     Attribute.RetentionPolicy p = types.getRetention(a);
  2279                     Attribute.RetentionPolicy p = types.getRetention(a);
  2279                     if (p != Attribute.RetentionPolicy.SOURCE)
  2280                     if (p != Attribute.RetentionPolicy.SOURCE)
  2280                         return true;
  2281                         return true;
  2281                 }
  2282                 }
  2282                 return false;
  2283                 return false;