Introduce PackagePartSource to store part class name in deserialized descriptors
Not used at the moment, will be in the following commits
This commit is contained in:
+3
-1
@@ -23,6 +23,7 @@ import org.jetbrains.kotlin.descriptors.ClassDescriptor;
|
||||
import org.jetbrains.kotlin.descriptors.PackageFragmentDescriptor;
|
||||
import org.jetbrains.kotlin.load.kotlin.header.KotlinClassHeader;
|
||||
import org.jetbrains.kotlin.name.Name;
|
||||
import org.jetbrains.kotlin.resolve.jvm.JvmClassName;
|
||||
import org.jetbrains.kotlin.resolve.scopes.ChainedMemberScope;
|
||||
import org.jetbrains.kotlin.resolve.scopes.MemberScope;
|
||||
import org.jetbrains.kotlin.serialization.ClassData;
|
||||
@@ -79,8 +80,9 @@ public final class DeserializedDescriptorResolver {
|
||||
String[] strings = kotlinClass.getClassHeader().getStrings();
|
||||
assert strings != null : "String table not found in " + kotlinClass;
|
||||
PackageData packageData = JvmProtoBufUtil.readPackageDataFrom(data, strings);
|
||||
JvmPackagePartSource source = new JvmPackagePartSource(JvmClassName.byClassId(kotlinClass.getClassId()));
|
||||
return new DeserializedPackageMemberScope(
|
||||
descriptor, packageData.getPackageProto(), packageData.getNameResolver(), components,
|
||||
descriptor, packageData.getPackageProto(), packageData.getNameResolver(), source, components,
|
||||
new Function0<Collection<Name>>() {
|
||||
@Override
|
||||
public Collection<Name> invoke() {
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright 2010-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.load.kotlin
|
||||
|
||||
import org.jetbrains.kotlin.resolve.jvm.JvmClassName
|
||||
import org.jetbrains.kotlin.serialization.deserialization.descriptors.PackagePartSource
|
||||
|
||||
class JvmPackagePartSource(val className: JvmClassName) : PackagePartSource
|
||||
Reference in New Issue
Block a user