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