use of org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedCallableMemberDescriptor in project kotlin by JetBrains.
the class KotlinTypeMapper method getPartSimpleNameForMangling.
@Nullable
private String getPartSimpleNameForMangling(@NotNull CallableMemberDescriptor descriptor) {
KtFile containingFile = DescriptorToSourceUtils.getContainingFile(descriptor);
if (containingFile != null) {
JvmFileClassInfo fileClassInfo = JvmFileClassUtil.getFileClassInfoNoResolve(containingFile);
if (fileClassInfo.getWithJvmMultifileClass()) {
return fileClassInfo.getFileClassFqName().shortName().asString();
}
return null;
}
descriptor = DescriptorUtils.getDirectMember(descriptor);
assert descriptor instanceof DeserializedCallableMemberDescriptor : "Descriptor without sources should be instance of DeserializedCallableMemberDescriptor, but: " + descriptor;
ContainingClassesInfo containingClassesInfo = getContainingClassesForDeserializedCallable((DeserializedCallableMemberDescriptor) descriptor);
String facadeShortName = containingClassesInfo.getFacadeClassId().getShortClassName().asString();
String implShortName = containingClassesInfo.getImplClassId().getShortClassName().asString();
return !facadeShortName.equals(implShortName) ? implShortName : null;
}
Aggregations