Make room for laziness in the Annotations interface

This commit is contained in:
Andrey Breslav
2014-01-21 14:09:10 +04:00
parent 357fc55358
commit 2ac0853225
7 changed files with 26 additions and 17 deletions
@@ -149,7 +149,7 @@ public class PropertyCodegen extends GenerationStateAware {
// Annotations on properties without backing fields are stored in bytecode on an empty synthetic method. This way they're still
// accessible via reflection, and 'deprecated' and 'private' flags prevent this method from being called accidentally
private void generateSyntheticMethodIfNeeded(@NotNull PropertyDescriptor descriptor) {
if (descriptor.getAnnotations().getAnnotationDescriptors().isEmpty()) return;
if (descriptor.getAnnotations().isEmpty()) return;
ReceiverParameterDescriptor receiver = descriptor.getReceiverParameter();
Type receiverAsmType = receiver == null ? null : typeMapper.mapType(receiver.getType());