Add 'constructor' keyword in whole project where needed
This commit is contained in:
@@ -42,7 +42,7 @@ import org.jetbrains.kotlin.resolve.scopes.JetScope
|
||||
import org.jetbrains.kotlin.types.TypeUtils
|
||||
import org.jetbrains.kotlin.utils.addToStdlib.firstIsInstanceOrNull
|
||||
|
||||
public abstract class ElementResolver protected(
|
||||
public abstract class ElementResolver protected constructor(
|
||||
public val resolveSession: ResolveSession
|
||||
) {
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ import com.intellij.openapi.vfs.VirtualFilePropertyEvent
|
||||
import com.intellij.openapi.util.SimpleModificationTracker
|
||||
import kotlin.platform.platformStatic
|
||||
|
||||
class ModuleTypeCacheManager private (project: Project) {
|
||||
class ModuleTypeCacheManager private constructor(project: Project) {
|
||||
companion object {
|
||||
platformStatic fun getInstance(project: Project) = ServiceManager.getService(project, javaClass<ModuleTypeCacheManager>())
|
||||
}
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import com.intellij.psi.stubs.StringStubIndexExtension
|
||||
import com.intellij.psi.stubs.StubIndexKey
|
||||
import org.jetbrains.kotlin.psi.JetCallableDeclaration
|
||||
|
||||
public class JetTopLevelExtensionsByReceiverTypeIndex private() : StringStubIndexExtension<JetCallableDeclaration>() {
|
||||
public class JetTopLevelExtensionsByReceiverTypeIndex private constructor() : StringStubIndexExtension<JetCallableDeclaration>() {
|
||||
|
||||
override fun getKey() = KEY
|
||||
|
||||
|
||||
@@ -115,7 +115,11 @@ fun LookupElement.addTailAndNameSimilarity(
|
||||
return lookupElement
|
||||
}
|
||||
|
||||
class ExpectedInfoClassification private(val substitutor: TypeSubstitutor?, val makeNotNullable: Boolean) {
|
||||
class ExpectedInfoClassification
|
||||
private constructor(
|
||||
val substitutor: TypeSubstitutor?,
|
||||
val makeNotNullable: Boolean
|
||||
) {
|
||||
companion object {
|
||||
val notMatches = ExpectedInfoClassification(null, false)
|
||||
fun matches(substitutor: TypeSubstitutor) = ExpectedInfoClassification(substitutor, false)
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.jetbrains.kotlin.platform.JavaToKotlinClassMap
|
||||
import org.jetbrains.kotlin.psi.psiUtil.*
|
||||
import java.util.ArrayList
|
||||
|
||||
data class DataForConversion private(
|
||||
data class DataForConversion private constructor(
|
||||
val elementsAndTexts: Collection<Any> /* list consisting of PsiElement's to convert and plain String's */,
|
||||
val importsAndPackage: String
|
||||
) {
|
||||
|
||||
@@ -112,7 +112,7 @@ public abstract class JetWholeProjectModalByCollectionAction<TTask : Any>(modalT
|
||||
abstract fun collectTasksForFile(project: Project, file: JetFile, accumulator: MutableCollection<TTask>)
|
||||
}
|
||||
|
||||
class JetWholeProjectForEachElementOfTypeFix<TTask> private (
|
||||
class JetWholeProjectForEachElementOfTypeFix<TTask> private constructor(
|
||||
private val collectingVisitorFactory: (MutableCollection<TTask>) -> JetVisitorVoid,
|
||||
private val tasksProcessor: (Collection<TTask>) -> Unit,
|
||||
private val name: String,
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.jetbrains.kotlin.diagnostics.Diagnostic
|
||||
import org.jetbrains.kotlin.idea.JetBundle
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
|
||||
public abstract class ReplaceCallFix protected (val psiElement: PsiElement) : IntentionAction {
|
||||
public abstract class ReplaceCallFix protected constructor(val psiElement: PsiElement) : IntentionAction {
|
||||
|
||||
override fun getFamilyName(): String = getText()
|
||||
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ import javax.swing.JComponent
|
||||
import javax.swing.JLabel
|
||||
import javax.swing.JPanel
|
||||
|
||||
public class KotlinIntroduceParameterDialog private (
|
||||
public class KotlinIntroduceParameterDialog private constructor(
|
||||
project: Project,
|
||||
val editor: Editor,
|
||||
val descriptor: IntroduceParameterDescriptor,
|
||||
|
||||
Reference in New Issue
Block a user