File class lowering

This commit is contained in:
Dmitry Petrov
2016-09-14 10:58:45 +03:00
committed by Dmitry Petrov
parent a25e781ee9
commit 5386d27284
17 changed files with 380 additions and 22 deletions
@@ -75,7 +75,7 @@ interface Annotations : Iterable<AnnotationDescriptor> {
}
}
private fun checkAnnotationName(annotation: AnnotationDescriptor, fqName: FqName): Boolean {
fun checkAnnotationName(annotation: AnnotationDescriptor, fqName: FqName): Boolean {
val descriptor = annotation.type.constructor.declarationDescriptor
return descriptor is ClassDescriptor && fqName.toUnsafe() == DescriptorUtils.getFqName(descriptor)
}
@@ -520,7 +520,11 @@ public class DescriptorUtils {
@Nullable
public static String getJvmName(@NotNull Annotated annotated) {
AnnotationDescriptor jvmNameAnnotation = getAnnotationByFqName(annotated.getAnnotations(), JVM_NAME);
return getJvmName(getJvmNameAnnotation(annotated));
}
@Nullable
public static String getJvmName(@Nullable AnnotationDescriptor jvmNameAnnotation) {
if (jvmNameAnnotation == null) return null;
Map<ValueParameterDescriptor, ConstantValue<?>> arguments = jvmNameAnnotation.getAllValueArguments();