155 |
155 |
156 private boolean needsHeader(ClassSymbol c, boolean checkNestedClasses) { |
156 private boolean needsHeader(ClassSymbol c, boolean checkNestedClasses) { |
157 if (c.isLocal() || (c.flags() & Flags.SYNTHETIC) != 0) |
157 if (c.isLocal() || (c.flags() & Flags.SYNTHETIC) != 0) |
158 return false; |
158 return false; |
159 |
159 |
|
160 /* temporary code for backwards compatibility */ |
160 for (Attribute.Compound a: c.annotations.getAttributes()) { |
161 for (Attribute.Compound a: c.annotations.getAttributes()) { |
161 if (a.type.tsym == syms.nativeHeaderType.tsym) |
162 if (a.type.tsym == syms.nativeHeaderType_old.tsym) |
162 return true; |
163 return true; |
163 } |
164 } |
|
165 /* end of temporary code for backwards compatibility */ |
|
166 |
164 for (Scope.Entry i = c.members_field.elems; i != null; i = i.sibling) { |
167 for (Scope.Entry i = c.members_field.elems; i != null; i = i.sibling) { |
165 if (i.sym.kind == Kinds.MTH && (i.sym.flags() & Flags.NATIVE) != 0) |
168 if (i.sym.kind == Kinds.MTH && (i.sym.flags() & Flags.NATIVE) != 0) |
166 return true; |
169 return true; |
|
170 for (Attribute.Compound a: i.sym.annotations.getAttributes()) { |
|
171 if (a.type.tsym == syms.nativeHeaderType.tsym) |
|
172 return true; |
|
173 } |
167 } |
174 } |
168 if (checkNestedClasses) { |
175 if (checkNestedClasses) { |
169 for (Scope.Entry i = c.members_field.elems; i != null; i = i.sibling) { |
176 for (Scope.Entry i = c.members_field.elems; i != null; i = i.sibling) { |
170 if ((i.sym.kind == Kinds.TYP) && needsHeader(((ClassSymbol) i.sym), true)) |
177 if ((i.sym.kind == Kinds.TYP) && needsHeader(((ClassSymbol) i.sym), true)) |
171 return true; |
178 return true; |