Synchronized is no more allowed on abstract functions

This commit is contained in:
Mikhail Glukhikh
2015-10-13 11:42:52 +03:00
parent ccf0c363fa
commit 5a16e43579
8 changed files with 75 additions and 0 deletions
@@ -55,6 +55,7 @@ public class DescriptorUtils {
public static final FqName JVM_NAME = new FqName("kotlin.jvm.JvmName");
public static final FqName PLATFORM_NAME = new FqName("kotlin.platform.platformName");
public static final FqName VOLATILE = new FqName("kotlin.jvm.Volatile");
public static final FqName SYNCHRONIZED = new FqName("kotlin.jvm.Synchronized");
private DescriptorUtils() {
}
@@ -611,6 +612,11 @@ public class DescriptorUtils {
return annotated.getAnnotations().findAnnotation(VOLATILE);
}
@Nullable
public static AnnotationDescriptor getSynchronizedAnnotation(@NotNull Annotated annotated) {
return annotated.getAnnotations().findAnnotation(SYNCHRONIZED);
}
@NotNull
public static SourceFile getContainingSourceFile(@NotNull DeclarationDescriptor descriptor) {
if (descriptor instanceof PropertySetterDescriptor) {