[Injection] Annotate default services with @DefaultImplementation
This commit is contained in:
@@ -6,20 +6,22 @@
|
||||
package org.jetbrains.kotlin.builtins;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.kotlin.container.DefaultImplementation;
|
||||
import org.jetbrains.kotlin.descriptors.ClassDescriptor;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
||||
@DefaultImplementation(impl = PlatformToKotlinClassMap.Default.class)
|
||||
public interface PlatformToKotlinClassMap {
|
||||
PlatformToKotlinClassMap EMPTY = new PlatformToKotlinClassMap() {
|
||||
@NotNull
|
||||
Collection<ClassDescriptor> mapPlatformClass(@NotNull ClassDescriptor classDescriptor);
|
||||
|
||||
class Default implements PlatformToKotlinClassMap {
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<ClassDescriptor> mapPlatformClass(@NotNull ClassDescriptor classDescriptor) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
};
|
||||
|
||||
@NotNull
|
||||
Collection<ClassDescriptor> mapPlatformClass(@NotNull ClassDescriptor classDescriptor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.resolve.scopes
|
||||
|
||||
import org.jetbrains.kotlin.container.DefaultImplementation
|
||||
import org.jetbrains.kotlin.descriptors.ConstructorDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.PropertyDescriptor
|
||||
@@ -95,6 +96,7 @@ interface SyntheticScope {
|
||||
}
|
||||
}
|
||||
|
||||
@DefaultImplementation(impl = SyntheticScopes.Empty::class)
|
||||
interface SyntheticScopes {
|
||||
val scopes: Collection<SyntheticScope>
|
||||
|
||||
|
||||
@@ -17,18 +17,20 @@
|
||||
package org.jetbrains.kotlin.types
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
import org.jetbrains.kotlin.container.DefaultImplementation
|
||||
import org.jetbrains.kotlin.descriptors.annotations.Annotations
|
||||
import org.jetbrains.kotlin.renderer.DescriptorRenderer
|
||||
import org.jetbrains.kotlin.renderer.DescriptorRendererOptions
|
||||
import org.jetbrains.kotlin.types.model.DynamicTypeMarker
|
||||
import org.jetbrains.kotlin.types.typeUtil.builtIns
|
||||
|
||||
@DefaultImplementation(impl = DynamicTypesSettings::class)
|
||||
open class DynamicTypesSettings {
|
||||
open val dynamicTypesAllowed: Boolean
|
||||
get() = false
|
||||
}
|
||||
|
||||
class DynamicTypesAllowed: DynamicTypesSettings() {
|
||||
class DynamicTypesAllowed : DynamicTypesSettings() {
|
||||
override val dynamicTypesAllowed: Boolean
|
||||
get() = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user