Add 'constructor' keyword in whole project where needed
This commit is contained in:
@@ -23,7 +23,7 @@ import org.jetbrains.org.objectweb.asm.Opcodes
|
||||
import org.jetbrains.org.objectweb.asm.Type
|
||||
import org.jetbrains.org.objectweb.asm.commons.InstructionAdapter
|
||||
|
||||
public class MonitorInstruction private (private val opcode: Int) : IntrinsicMethod() {
|
||||
public class MonitorInstruction private constructor(private val opcode: Int) : IntrinsicMethod() {
|
||||
companion object {
|
||||
public val MONITOR_ENTER: MonitorInstruction = MonitorInstruction(Opcodes.MONITORENTER)
|
||||
public val MONITOR_EXIT: MonitorInstruction = MonitorInstruction(Opcodes.MONITOREXIT)
|
||||
|
||||
@@ -90,7 +90,7 @@ import java.util.Comparator
|
||||
import kotlin.platform.platformStatic
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
public class KotlinCoreEnvironment private(
|
||||
public class KotlinCoreEnvironment private constructor(
|
||||
parentDisposable: Disposable,
|
||||
applicationEnvironment: JavaCoreApplicationEnvironment,
|
||||
configuration: CompilerConfiguration
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import org.jetbrains.kotlin.utils.rethrow
|
||||
import java.io.FileNotFoundException
|
||||
import java.io.IOException
|
||||
|
||||
public class VirtualFileKotlinClass private(
|
||||
public class VirtualFileKotlinClass private constructor(
|
||||
public val file: VirtualFile,
|
||||
className: ClassId,
|
||||
classHeader: KotlinClassHeader,
|
||||
|
||||
+2
-2
@@ -35,14 +35,14 @@ public trait AccessTarget {
|
||||
public object BlackBox: AccessTarget
|
||||
}
|
||||
|
||||
public abstract class AccessValueInstruction protected (
|
||||
public abstract class AccessValueInstruction protected constructor(
|
||||
element: JetElement,
|
||||
lexicalScope: LexicalScope,
|
||||
public val target: AccessTarget,
|
||||
override val receiverValues: Map<PseudoValue, ReceiverValue>
|
||||
) : InstructionWithNext(element, lexicalScope), InstructionWithReceivers
|
||||
|
||||
public class ReadValueInstruction private (
|
||||
public class ReadValueInstruction private constructor(
|
||||
element: JetElement,
|
||||
lexicalScope: LexicalScope,
|
||||
target: AccessTarget,
|
||||
|
||||
+3
-3
@@ -28,7 +28,7 @@ import org.jetbrains.kotlin.resolve.scopes.receivers.ReceiverValue
|
||||
import org.jetbrains.kotlin.descriptors.ValueParameterDescriptor
|
||||
import org.jetbrains.kotlin.cfg.pseudocode.TypePredicate
|
||||
|
||||
public abstract class OperationInstruction protected(
|
||||
public abstract class OperationInstruction protected constructor(
|
||||
element: JetElement,
|
||||
lexicalScope: LexicalScope,
|
||||
override val inputValues: List<PseudoValue>
|
||||
@@ -58,7 +58,7 @@ trait StrictlyValuedOperationInstruction: OperationInstruction {
|
||||
get() = resultValue!!
|
||||
}
|
||||
|
||||
public class CallInstruction private(
|
||||
public class CallInstruction private constructor(
|
||||
element: JetElement,
|
||||
lexicalScope: LexicalScope,
|
||||
val resolvedCall: ResolvedCall<*>,
|
||||
@@ -152,7 +152,7 @@ public enum class MagicKind(val sideEffectFree: Boolean = false) {
|
||||
}
|
||||
|
||||
// Merges values produced by alternative control-flow paths (such as 'if' branches)
|
||||
class MergeInstruction private(
|
||||
class MergeInstruction private constructor(
|
||||
element: JetElement,
|
||||
lexicalScope: LexicalScope,
|
||||
inputValues: List<PseudoValue>
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.jetbrains.kotlin.psi.JetExpression
|
||||
import org.jetbrains.kotlin.resolve.diagnostics.Diagnostics
|
||||
import org.jetbrains.kotlin.types.JetType
|
||||
|
||||
public class CompositeBindingContext private (
|
||||
public class CompositeBindingContext private constructor(
|
||||
private val delegates: List<BindingContext>
|
||||
) : BindingContext {
|
||||
override fun getType(expression: JetExpression): JetType? {
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ import org.jetbrains.kotlin.resolve.calls.callUtil.getResolvedCall
|
||||
import org.jetbrains.kotlin.psi.psiUtil.getStrictParentOfType
|
||||
import kotlin.platform.platformStatic
|
||||
|
||||
public class ConstantExpressionEvaluator private (val trace: BindingTrace) : JetVisitor<CompileTimeConstant<*>, JetType>() {
|
||||
public class ConstantExpressionEvaluator private constructor(val trace: BindingTrace) : JetVisitor<CompileTimeConstant<*>, JetType>() {
|
||||
|
||||
companion object {
|
||||
platformStatic public fun evaluate(expression: JetExpression, trace: BindingTrace, expectedType: JetType? = TypeUtils.NO_EXPECTED_TYPE): CompileTimeConstant<*>? {
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import org.jetbrains.kotlin.psi.JetFile
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.storage.StorageManager
|
||||
|
||||
public class FileBasedPackageMemberDeclarationProvider internal(
|
||||
public class FileBasedPackageMemberDeclarationProvider internal constructor(
|
||||
storageManager: StorageManager,
|
||||
private val fqName: FqName,
|
||||
private val factory: FileBasedDeclarationProviderFactory,
|
||||
|
||||
+4
-2
@@ -36,11 +36,13 @@ import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter
|
||||
import org.jetbrains.kotlin.resolve.lazy.ResolveSession
|
||||
import org.jetbrains.kotlin.resolve.lazy.LazyClassContext
|
||||
|
||||
public abstract class AbstractLazyMemberScope<D : DeclarationDescriptor, DP : DeclarationProvider> protected(
|
||||
public abstract class AbstractLazyMemberScope<D : DeclarationDescriptor, DP : DeclarationProvider>
|
||||
protected constructor(
|
||||
protected val c: LazyClassContext,
|
||||
protected val declarationProvider: DP,
|
||||
protected val thisDescriptor: D,
|
||||
protected val trace: BindingTrace) : JetScope {
|
||||
protected val trace: BindingTrace
|
||||
) : JetScope {
|
||||
|
||||
protected val storageManager: StorageManager = c.storageManager
|
||||
private val classDescriptors: MemoizedFunctionToNotNull<Name, List<ClassDescriptor>> = storageManager.createMemoizedFunction { resolveClassDescriptor(it) }
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ import java.util.Collections
|
||||
import org.jetbrains.kotlin.descriptors.impl.ConstructorDescriptorImpl
|
||||
|
||||
// SCRIPT: Members of a script class
|
||||
public class LazyScriptClassMemberScope protected(
|
||||
public class LazyScriptClassMemberScope protected constructor(
|
||||
private val resolveSession: ResolveSession,
|
||||
declarationProvider: ClassMemberDeclarationProvider,
|
||||
thisClass: LazyClassDescriptor,
|
||||
|
||||
@@ -22,7 +22,11 @@ import com.intellij.openapi.extensions.ExtensionPointName
|
||||
import java.lang.ref.WeakReference
|
||||
import kotlin.platform.platformStatic
|
||||
|
||||
public open class MappedExtensionProvider<T, R> protected (private val epName: ExtensionPointName<T>, private val map: (List<T>) -> R) {
|
||||
public open class MappedExtensionProvider<T, R>
|
||||
protected constructor(
|
||||
private val epName: ExtensionPointName<T>,
|
||||
private val map: (List<T>) -> R
|
||||
) {
|
||||
private var cached = WeakReference<Pair<Application, R>>(null)
|
||||
|
||||
public fun get(): R {
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ import org.jetbrains.kotlin.psi.JetFile
|
||||
import javax.swing.*
|
||||
import org.jetbrains.kotlin.psi.JetClassOrObject
|
||||
|
||||
public class KotlinLightClassForPackage private(
|
||||
public class KotlinLightClassForPackage private constructor(
|
||||
manager: PsiManager,
|
||||
private val packageFqName: FqName,
|
||||
private val searchScope: GlobalSearchScope,
|
||||
|
||||
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.config
|
||||
|
||||
import java.util.HashMap
|
||||
|
||||
public class Services private(private val map: Map<Class<*>, Any>) {
|
||||
public class Services private constructor(private val map: Map<Class<*>, Any>) {
|
||||
companion object {
|
||||
public val EMPTY: Services = Builder().build()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user