Code cleanup: protected is effectively private
This commit is contained in:
@@ -86,7 +86,7 @@ class AddExclExclCallFix(val psiElement: PsiElement) : ExclExclCallFix() {
|
||||
modifiedExpression.replace(exclExclExpression)
|
||||
}
|
||||
|
||||
protected fun getExpressionForIntroduceCall(): KtExpression? {
|
||||
private fun getExpressionForIntroduceCall(): KtExpression? {
|
||||
if (psiElement is LeafPsiElement && psiElement.elementType == KtTokens.DOT) {
|
||||
val sibling = psiElement.prevSibling
|
||||
if (sibling is KtExpression) {
|
||||
|
||||
+1
-1
@@ -146,7 +146,7 @@ class KotlinCallableDefinitionUsage<T : PsiElement>(
|
||||
return true
|
||||
}
|
||||
|
||||
protected fun changeReturnTypeIfNeeded(changeInfo: KotlinChangeInfo, element: PsiElement) {
|
||||
private fun changeReturnTypeIfNeeded(changeInfo: KotlinChangeInfo, element: PsiElement) {
|
||||
if (element !is KtCallableDeclaration) return
|
||||
if (element is KtConstructor<*>) return
|
||||
|
||||
|
||||
+1
-1
@@ -107,7 +107,7 @@ class KotlinFunctionCallUsage(
|
||||
return resolvedCall?.resultingDescriptor is JavaMethodDescriptor
|
||||
}
|
||||
|
||||
protected fun changeNameIfNeeded(changeInfo: KotlinChangeInfo, element: KtCallElement) {
|
||||
private fun changeNameIfNeeded(changeInfo: KotlinChangeInfo, element: KtCallElement) {
|
||||
if (!changeInfo.isNameChanged) return
|
||||
|
||||
val callee = element.calleeExpression
|
||||
|
||||
+1
-1
@@ -74,7 +74,7 @@ class KotlinInplacePropertyIntroducer(
|
||||
|
||||
private var replaceAll: Boolean = true
|
||||
|
||||
protected var property: KtProperty
|
||||
private var property: KtProperty
|
||||
get() = myDeclaration
|
||||
set(value: KtProperty) {
|
||||
myDeclaration = value
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ class KotlinMemberSelectionPanel(title: String,
|
||||
add(scrollPane, BorderLayout.CENTER)
|
||||
}
|
||||
|
||||
protected fun createMemberSelectionTable(
|
||||
private fun createMemberSelectionTable(
|
||||
memberInfo: List<KotlinMemberInfo>,
|
||||
abstractColumnHeader: String?
|
||||
): KotlinMemberSelectionTable {
|
||||
|
||||
@@ -93,9 +93,9 @@ class KotlinPullUpDialog(
|
||||
}
|
||||
}
|
||||
|
||||
protected val memberInfoStorage: KotlinMemberInfoStorage get() = myMemberInfoStorage
|
||||
private val memberInfoStorage: KotlinMemberInfoStorage get() = myMemberInfoStorage
|
||||
|
||||
protected val sourceClass: KtClassOrObject get() = myClass as KtClassOrObject
|
||||
private val sourceClass: KtClassOrObject get() = myClass as KtClassOrObject
|
||||
|
||||
override fun getDimensionServiceKey() = "#" + javaClass.name
|
||||
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ class CliAndroidLayoutXmlFileManager(
|
||||
return resources
|
||||
}
|
||||
|
||||
protected fun initSAX(): SAXParser {
|
||||
private fun initSAX(): SAXParser {
|
||||
val saxFactory = SAXParserFactory.newInstance()
|
||||
saxFactory.isNamespaceAware = true
|
||||
return saxFactory.newSAXParser()
|
||||
|
||||
@@ -188,7 +188,7 @@ open class ApiDetector : Detector(), UastScanner {
|
||||
|| fqName.startsWith("dalvik.")
|
||||
}
|
||||
|
||||
protected fun getMinSdk(context: UastAndroidContext): Int {
|
||||
private fun getMinSdk(context: UastAndroidContext): Int {
|
||||
if (mMinApi == -1) {
|
||||
val minSdkVersion = context.lintContext.mainProject.minSdkVersion
|
||||
mMinApi = minSdkVersion.featureLevel
|
||||
|
||||
Reference in New Issue
Block a user