src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java

Print this page




1595             for (int i = 0; i<numAttributes; i++) {
1596                 CompoundAnnotationProxy proxy = readCompoundAnnotation();
1597                 if (proxy.type.tsym == syms.proprietaryType.tsym)
1598                     sym.flags_field |= PROPRIETARY;
1599                 else if (proxy.type.tsym == syms.profileType.tsym) {
1600                     if (profile != Profile.DEFAULT) {
1601                         for (Pair<Name,Attribute> v: proxy.values) {
1602                             if (v.fst == names.value && v.snd instanceof Attribute.Constant) {
1603                                 Attribute.Constant c = (Attribute.Constant) v.snd;
1604                                 if (c.type == syms.intType && ((Integer) c.value) > profile.value) {
1605                                     sym.flags_field |= NOT_IN_PROFILE;
1606                                 }
1607                             }
1608                         }
1609                     }
1610                 } else {
1611                     if (proxy.type.tsym == syms.annotationTargetType.tsym) {
1612                         target = proxy;
1613                     } else if (proxy.type.tsym == syms.repeatableType.tsym) {
1614                         repeatable = proxy;
1615                     } else if (sym.kind == TYP && proxy.type.tsym == syms.deriveValueType.tsym) {
1616                         sym.flags_field |= VALUE_CAPABLE;
1617                     } else if (proxy.type.tsym == syms.deprecatedType.tsym) {
1618                         sym.flags_field |= (DEPRECATED | DEPRECATED_ANNOTATION);
1619                         for (Pair<Name, Attribute> v : proxy.values) {
1620                             if (v.fst == names.forRemoval && v.snd instanceof Attribute.Constant) {
1621                                 Attribute.Constant c = (Attribute.Constant) v.snd;
1622                                 if (c.type == syms.booleanType && ((Integer) c.value) != 0) {
1623                                     sym.flags_field |= DEPRECATED_REMOVAL;
1624                                 }
1625                             }
1626                         }
1627                     }
1628 
1629                     proxies.append(proxy);
1630                 }
1631             }
1632             annotate.normal(new AnnotationCompleter(sym, proxies.toList()));
1633         }
1634     }
1635 




1595             for (int i = 0; i<numAttributes; i++) {
1596                 CompoundAnnotationProxy proxy = readCompoundAnnotation();
1597                 if (proxy.type.tsym == syms.proprietaryType.tsym)
1598                     sym.flags_field |= PROPRIETARY;
1599                 else if (proxy.type.tsym == syms.profileType.tsym) {
1600                     if (profile != Profile.DEFAULT) {
1601                         for (Pair<Name,Attribute> v: proxy.values) {
1602                             if (v.fst == names.value && v.snd instanceof Attribute.Constant) {
1603                                 Attribute.Constant c = (Attribute.Constant) v.snd;
1604                                 if (c.type == syms.intType && ((Integer) c.value) > profile.value) {
1605                                     sym.flags_field |= NOT_IN_PROFILE;
1606                                 }
1607                             }
1608                         }
1609                     }
1610                 } else {
1611                     if (proxy.type.tsym == syms.annotationTargetType.tsym) {
1612                         target = proxy;
1613                     } else if (proxy.type.tsym == syms.repeatableType.tsym) {
1614                         repeatable = proxy;
1615                     } else if (sym.kind == TYP && proxy.type.tsym == syms.valueCapableClass.tsym) {
1616                         sym.flags_field |= VALUE_CAPABLE;
1617                     } else if (proxy.type.tsym == syms.deprecatedType.tsym) {
1618                         sym.flags_field |= (DEPRECATED | DEPRECATED_ANNOTATION);
1619                         for (Pair<Name, Attribute> v : proxy.values) {
1620                             if (v.fst == names.forRemoval && v.snd instanceof Attribute.Constant) {
1621                                 Attribute.Constant c = (Attribute.Constant) v.snd;
1622                                 if (c.type == syms.booleanType && ((Integer) c.value) != 0) {
1623                                     sym.flags_field |= DEPRECATED_REMOVAL;
1624                                 }
1625                             }
1626                         }
1627                     }
1628 
1629                     proxies.append(proxy);
1630                 }
1631             }
1632             annotate.normal(new AnnotationCompleter(sym, proxies.toList()));
1633         }
1634     }
1635