Drop Annotations.getAllAnnotations

This commit is contained in:
Alexander Udalov
2018-08-16 12:18:36 +02:00
parent 83fbabd628
commit 87c0d56618
22 changed files with 51 additions and 109 deletions
@@ -245,7 +245,7 @@ public abstract class MemberCodegen<T extends KtPureElement/* TODO: & KtDeclarat
private void genTypeAliasAnnotationsMethodIfRequired(TypeAliasDescriptor typeAliasDescriptor) {
boolean isAnnotationsMethodOwner = CodegenContextUtil.isImplClassOwner(context);
Annotations annotations = typeAliasDescriptor.getAnnotations();
if (!isAnnotationsMethodOwner || annotations.getAllAnnotations().isEmpty()) return;
if (!isAnnotationsMethodOwner || annotations.isEmpty()) return;
String name = JvmAbi.getSyntheticMethodNameForAnnotatedTypeAlias(typeAliasDescriptor.getName());
generateSyntheticAnnotationsMethod(typeAliasDescriptor, new Method(name, "()V"), annotations);
@@ -335,7 +335,7 @@ public class PropertyCodegen {
// accessible via reflection, and 'deprecated' and 'synthetic' flags prevent this method from being called accidentally
private void generateSyntheticMethodIfNeeded(@NotNull PropertyDescriptor descriptor, boolean isBackingFieldOwner) {
Annotations annotations = descriptor.getAnnotations();
if (annotations.getAllAnnotations().isEmpty()) return;
if (annotations.isEmpty()) return;
Method signature = getSyntheticMethodSignature(descriptor);
if (kind != OwnerKind.DEFAULT_IMPLS && CodegenContextUtil.isImplClassOwner(context)) {