rename Kt to Kotlin in KtType, KtIcons

This commit is contained in:
Dmitry Jemerov
2015-10-20 16:23:25 +02:00
parent 9d7a8e7696
commit d6a3870101
457 changed files with 2831 additions and 2830 deletions
@@ -17,12 +17,12 @@
package org.jetbrains.kotlin.serialization.deserialization
import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedClassDescriptor
import org.jetbrains.kotlin.types.KtType
import org.jetbrains.kotlin.types.KotlinType
interface AdditionalSupertypes {
fun forClass(classDescriptor: DeserializedClassDescriptor): Collection<KtType>
fun forClass(classDescriptor: DeserializedClassDescriptor): Collection<KotlinType>
object None : AdditionalSupertypes {
override fun forClass(classDescriptor: DeserializedClassDescriptor): Collection<KtType> = emptyList()
override fun forClass(classDescriptor: DeserializedClassDescriptor): Collection<KotlinType> = emptyList()
}
}
@@ -20,7 +20,7 @@ import com.google.protobuf.MessageLite;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.kotlin.serialization.ProtoBuf;
import org.jetbrains.kotlin.types.KtType;
import org.jetbrains.kotlin.types.KotlinType;
import java.util.List;
@@ -72,6 +72,6 @@ public interface AnnotationAndConstantLoader<A, C, T> {
C loadPropertyConstant(
@NotNull ProtoContainer container,
@NotNull ProtoBuf.Property proto,
@NotNull KtType expectedType
@NotNull KotlinType expectedType
);
}
@@ -30,7 +30,7 @@ import org.jetbrains.kotlin.serialization.ProtoBuf.Annotation.Argument
import org.jetbrains.kotlin.serialization.ProtoBuf.Annotation.Argument.Value
import org.jetbrains.kotlin.serialization.ProtoBuf.Annotation.Argument.Value.Type
import org.jetbrains.kotlin.types.ErrorUtils
import org.jetbrains.kotlin.types.KtType
import org.jetbrains.kotlin.types.KotlinType
import org.jetbrains.kotlin.types.Variance
import org.jetbrains.kotlin.types.typeUtil.isSubtypeOf
@@ -65,7 +65,7 @@ public class AnnotationDeserializer(private val module: ModuleDescriptor) {
}
public fun resolveValue(
expectedType: KtType,
expectedType: KotlinType,
value: Value,
nameResolver: NameResolver
): ConstantValue<*> {
@@ -141,7 +141,7 @@ public class AnnotationDeserializer(private val module: ModuleDescriptor) {
return factory.createErrorValue("Unresolved enum entry: $enumClassId.$enumEntryName")
}
private fun resolveArrayElementType(value: Value, nameResolver: NameResolver): KtType =
private fun resolveArrayElementType(value: Value, nameResolver: NameResolver): KotlinType =
with(builtIns) {
when (value.getType()) {
Type.BYTE -> getByteType()
@@ -53,7 +53,7 @@ public class TypeDeserializer(
get() = typeParameterDescriptors().values().toReadOnlyList()
// TODO: don't load identical types from TypeTable more than once
fun type(proto: ProtoBuf.Type, additionalAnnotations: Annotations = Annotations.EMPTY): KtType {
fun type(proto: ProtoBuf.Type, additionalAnnotations: Annotations = Annotations.EMPTY): KotlinType {
if (proto.hasFlexibleTypeCapabilitiesId()) {
val id = c.nameResolver.getString(proto.flexibleTypeCapabilitiesId)
val capabilities = c.components.flexibleTypeCapabilitiesDeserializer.capabilitiesById(id) ?:
@@ -32,7 +32,7 @@ import org.jetbrains.kotlin.serialization.Flags
import org.jetbrains.kotlin.serialization.ProtoBuf
import org.jetbrains.kotlin.serialization.deserialization.*
import org.jetbrains.kotlin.types.AbstractClassTypeConstructor
import org.jetbrains.kotlin.types.KtType
import org.jetbrains.kotlin.types.KotlinType
import org.jetbrains.kotlin.types.upperIfFlexible
import org.jetbrains.kotlin.utils.addIfNotNull
import org.jetbrains.kotlin.utils.singletonOrEmptyList
@@ -134,8 +134,8 @@ public class DeserializedClassDescriptor(
override fun getCompanionObjectDescriptor(): ClassDescriptor? = companionObjectDescriptor()
private fun computeSupertypes(): Collection<KtType> {
val result = ArrayList<KtType>(classProto.supertypeCount)
private fun computeSupertypes(): Collection<KotlinType> {
val result = ArrayList<KotlinType>(classProto.supertypeCount)
val unresolved = ArrayList<DeserializedType>(0)
for (supertypeProto in classProto.supertypes(c.typeTable)) {
@@ -23,7 +23,7 @@ import org.jetbrains.kotlin.descriptors.impl.AbstractLazyTypeParameterDescriptor
import org.jetbrains.kotlin.resolve.descriptorUtil.builtIns
import org.jetbrains.kotlin.serialization.ProtoBuf
import org.jetbrains.kotlin.serialization.deserialization.*
import org.jetbrains.kotlin.types.KtType
import org.jetbrains.kotlin.types.KotlinType
import java.util.*
class DeserializedTypeParameterDescriptor(
@@ -39,12 +39,12 @@ class DeserializedTypeParameterDescriptor(
override fun getAnnotations(): Annotations = annotations
override fun resolveUpperBounds(): Set<KtType> {
override fun resolveUpperBounds(): Set<KotlinType> {
val upperBounds = proto.upperBounds(typeTable)
if (upperBounds.isEmpty()) {
return setOf(this.builtIns.getDefaultBound())
}
val result = LinkedHashSet<KtType>(upperBounds.size())
val result = LinkedHashSet<KotlinType>(upperBounds.size())
for (upperBound in upperBounds) {
result.add(typeDeserializer.type(upperBound, Annotations.EMPTY))
}