Cleanup: get rid of effective visibility warnings
This commit is contained in:
committed by
Mikhail Glukhikh
parent
932542891b
commit
f8a70302ac
+1
-1
@@ -31,7 +31,7 @@ public abstract class ClassNameCollectionClassBuilderFactory(
|
||||
|
||||
protected abstract fun handleClashingNames(internalName: String, origin: JvmDeclarationOrigin)
|
||||
|
||||
override fun newClassBuilder(origin: JvmDeclarationOrigin): ClassNameCollectionClassBuilder {
|
||||
override fun newClassBuilder(origin: JvmDeclarationOrigin): DelegatingClassBuilder {
|
||||
return ClassNameCollectionClassBuilder(origin, delegate.newClassBuilder(origin))
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ public abstract class SignatureCollectingClassBuilderFactory(
|
||||
classInternalName: String?,
|
||||
signatures: MultiMap<RawSignature, JvmDeclarationOrigin>)
|
||||
|
||||
override fun newClassBuilder(origin: JvmDeclarationOrigin): SignatureCollectingClassBuilder {
|
||||
override fun newClassBuilder(origin: JvmDeclarationOrigin): DelegatingClassBuilder {
|
||||
return SignatureCollectingClassBuilder(origin, delegate.newClassBuilder(origin))
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ package org.jetbrains.kotlin.codegen.inline
|
||||
import org.jetbrains.org.objectweb.asm.Type
|
||||
import java.util.*
|
||||
|
||||
class Parameters(val real: List<ParameterInfo>, val captured: List<CapturedParamInfo>) : Iterable<ParameterInfo> {
|
||||
internal class Parameters(val real: List<ParameterInfo>, val captured: List<CapturedParamInfo>) : Iterable<ParameterInfo> {
|
||||
|
||||
private val actualDeclShifts: Array<ParameterInfo?>
|
||||
private val paramToDeclByteCodeIndex: HashMap<ParameterInfo, Int> = hashMapOf()
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.lang.Deprecated
|
||||
import java.util.ArrayList
|
||||
import java.util.Collections
|
||||
|
||||
class ParametersBuilder private constructor(){
|
||||
internal class ParametersBuilder private constructor(){
|
||||
|
||||
private val valueAndHiddenParams = arrayListOf<ParameterInfo>()
|
||||
private val capturedParams = arrayListOf<CapturedParamInfo>()
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ import org.jetbrains.org.objectweb.asm.tree.analysis.Frame
|
||||
import org.jetbrains.org.objectweb.asm.tree.analysis.Interpreter
|
||||
import java.util.*
|
||||
|
||||
public class FixStackAnalyzer(
|
||||
internal class FixStackAnalyzer(
|
||||
owner: String,
|
||||
methodNode: MethodNode,
|
||||
val context: FixStackContext
|
||||
|
||||
@@ -91,7 +91,7 @@ public class StorageComponentContainer(id: String) : ComponentContainer, Compone
|
||||
return componentStorage.resolveMultiple(request, context)
|
||||
}
|
||||
|
||||
public fun registerDescriptors(descriptors: List<ComponentDescriptor>): StorageComponentContainer {
|
||||
internal fun registerDescriptors(descriptors: List<ComponentDescriptor>): StorageComponentContainer {
|
||||
componentStorage.registerDescriptors(unknownContext, descriptors)
|
||||
return this
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public interface ValueResolveContext {
|
||||
fun resolve(registration: Type): ValueDescriptor?
|
||||
}
|
||||
|
||||
internal class ComponentResolveContext(val container: StorageComponentContainer, val requestingDescriptor: ValueDescriptor) : ValueResolveContext {
|
||||
public class ComponentResolveContext(val container: StorageComponentContainer, val requestingDescriptor: ValueDescriptor) : ValueResolveContext {
|
||||
override fun resolve(registration: Type): ValueDescriptor? = container.resolve(registration, this)
|
||||
|
||||
override fun toString(): String = "for $requestingDescriptor in $container"
|
||||
|
||||
@@ -33,13 +33,13 @@ public enum class ComponentStorageState {
|
||||
Disposed
|
||||
}
|
||||
|
||||
class InvalidCardinalityException(message: String, val descriptors: Collection<ComponentDescriptor>) : Exception(message)
|
||||
internal class InvalidCardinalityException(message: String, val descriptors: Collection<ComponentDescriptor>) : Exception(message)
|
||||
|
||||
public class ComponentStorage(val myId: String) : ValueResolver {
|
||||
var state = ComponentStorageState.Initial
|
||||
val registry = ComponentRegistry()
|
||||
val descriptors = LinkedHashSet<ComponentDescriptor>()
|
||||
val dependencies = MultiMap.createLinkedSet<ComponentDescriptor, Type>()
|
||||
private val registry = ComponentRegistry()
|
||||
private val descriptors = LinkedHashSet<ComponentDescriptor>()
|
||||
private val dependencies = MultiMap.createLinkedSet<ComponentDescriptor, Type>()
|
||||
|
||||
override fun resolve(request: Type, context: ValueResolveContext): ValueDescriptor? {
|
||||
if (state == ComponentStorageState.Initial)
|
||||
@@ -93,7 +93,7 @@ public class ComponentStorage(val myId: String) : ValueResolver {
|
||||
return registry.tryGetEntry(request)
|
||||
}
|
||||
|
||||
public fun registerDescriptors(context: ComponentResolveContext, items: List<ComponentDescriptor>) {
|
||||
internal fun registerDescriptors(context: ComponentResolveContext, items: List<ComponentDescriptor>) {
|
||||
if (state == ComponentStorageState.Disposed) {
|
||||
throw ContainerConsistencyException("Cannot register descriptors in $state state")
|
||||
}
|
||||
@@ -192,7 +192,7 @@ public class ComponentStorage(val myId: String) : ValueResolver {
|
||||
state = ComponentStorageState.Disposed
|
||||
}
|
||||
|
||||
fun getDescriptorsInDisposeOrder(): List<ComponentDescriptor> {
|
||||
private fun getDescriptorsInDisposeOrder(): List<ComponentDescriptor> {
|
||||
return topologicalSort(descriptors) {
|
||||
val dependent = ArrayList<ComponentDescriptor>()
|
||||
for (interfaceType in dependencies[it]) {
|
||||
@@ -204,7 +204,7 @@ public class ComponentStorage(val myId: String) : ValueResolver {
|
||||
}
|
||||
}
|
||||
|
||||
fun disposeDescriptor(descriptor: ComponentDescriptor) {
|
||||
private fun disposeDescriptor(descriptor: ComponentDescriptor) {
|
||||
if (descriptor is Closeable)
|
||||
descriptor.close()
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.jetbrains.kotlin.kdoc.psi.api.KDoc;
|
||||
import org.jetbrains.kotlin.psi.findDocComment.FindDocCommentKt;
|
||||
import org.jetbrains.kotlin.psi.stubs.KotlinClassOrObjectStub;
|
||||
|
||||
abstract class KtDeclarationStub<T extends StubElement<?>> extends KtModifierListOwnerStub<T> implements KtDeclaration {
|
||||
public abstract class KtDeclarationStub<T extends StubElement<?>> extends KtModifierListOwnerStub<T> implements KtDeclaration {
|
||||
private long modificationStamp = 0;
|
||||
|
||||
public KtDeclarationStub(@NotNull T stub, @NotNull IStubElementType nodeType) {
|
||||
|
||||
+1
-1
@@ -845,7 +845,7 @@ private fun getReceiverExpressionType(resolvedCall: ResolvedCall<*>): KotlinType
|
||||
}
|
||||
}
|
||||
|
||||
private class CompileTimeType<T>
|
||||
internal class CompileTimeType<T>
|
||||
|
||||
internal val BYTE = CompileTimeType<Byte>()
|
||||
internal val SHORT = CompileTimeType<Short>()
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ public class LockBasedLazyResolveStorageManager(private val storageManager: Stor
|
||||
override fun <K, V : Any> createSoftlyRetainedMemoizedFunctionWithNullableValues(compute: Function1<K, V>) =
|
||||
storageManager.createMemoizedFunctionWithNullableValues<K, V>(compute, ContainerUtil.createConcurrentSoftValueMap<K, Any>())
|
||||
|
||||
override fun createSafeTrace(originalTrace: BindingTrace) =
|
||||
override fun createSafeTrace(originalTrace: BindingTrace): BindingTrace =
|
||||
LockProtectedTrace(storageManager, originalTrace)
|
||||
|
||||
private class LockProtectedContext(private val storageManager: StorageManager, private val context: BindingContext) : BindingContext {
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ package org.jetbrains.kotlin.types.expressions;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.kotlin.psi.KtVisitor;
|
||||
|
||||
/*package*/ abstract class ExpressionTypingVisitor extends KtVisitor<JetTypeInfo, ExpressionTypingContext> {
|
||||
public abstract class ExpressionTypingVisitor extends KtVisitor<JetTypeInfo, ExpressionTypingContext> {
|
||||
|
||||
protected final ExpressionTypingInternals facade;
|
||||
protected final ExpressionTypingComponents components;
|
||||
|
||||
@@ -73,7 +73,7 @@ public abstract class PerformanceCounter protected constructor(val name: String)
|
||||
}
|
||||
}
|
||||
|
||||
protected val excludedFrom: MutableList<CounterWithExclude> = ArrayList()
|
||||
internal val excludedFrom: MutableList<CounterWithExclude> = ArrayList()
|
||||
|
||||
private var count: Int = 0
|
||||
private var totalTimeNanos: Long = 0
|
||||
@@ -167,7 +167,7 @@ private class ReenterableCounter(name: String): PerformanceCounter(name) {
|
||||
*
|
||||
* Main and excluded methods may be reenterable.
|
||||
*/
|
||||
private class CounterWithExclude(name: String, vararg excludedCounters: PerformanceCounter): PerformanceCounter(name) {
|
||||
internal class CounterWithExclude(name: String, vararg excludedCounters: PerformanceCounter): PerformanceCounter(name) {
|
||||
companion object {
|
||||
private val counterToCallStackMapThreadLocal = ThreadLocal<MutableMap<CounterWithExclude, CallStackWithTime>>()
|
||||
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import org.jetbrains.kotlin.psi.KtEnumEntry
|
||||
import com.intellij.psi.PsiEnumConstantInitializer
|
||||
import com.intellij.psi.PsiEnumConstant
|
||||
|
||||
public class KotlinLightClassForEnumEntry(
|
||||
internal class KotlinLightClassForEnumEntry(
|
||||
psiManager: PsiManager,
|
||||
fqName: FqName,
|
||||
enumEntry: KtEnumEntry,
|
||||
|
||||
@@ -179,7 +179,7 @@ public abstract class AbstractWriteSignatureTest : TestCaseWithTmpdir() {
|
||||
}
|
||||
}
|
||||
|
||||
fun parseExpectations(ktFile: File): PackageExpectationsSuite {
|
||||
private fun parseExpectations(ktFile: File): PackageExpectationsSuite {
|
||||
val expectations = PackageExpectationsSuite()
|
||||
|
||||
val lines = Files.readLines(ktFile, Charset.forName("utf-8"))
|
||||
|
||||
+3
-2
@@ -33,6 +33,7 @@ import org.jetbrains.kotlin.serialization.ProtoBuf
|
||||
import org.jetbrains.kotlin.serialization.deserialization.*
|
||||
import org.jetbrains.kotlin.types.AbstractClassTypeConstructor
|
||||
import org.jetbrains.kotlin.types.KotlinType
|
||||
import org.jetbrains.kotlin.types.TypeConstructor
|
||||
import org.jetbrains.kotlin.types.upperIfFlexible
|
||||
import org.jetbrains.kotlin.utils.addIfNotNull
|
||||
import org.jetbrains.kotlin.utils.singletonOrEmptyList
|
||||
@@ -81,7 +82,7 @@ public class DeserializedClassDescriptor(
|
||||
|
||||
override fun getContainingDeclaration(): DeclarationDescriptor = containingDeclaration
|
||||
|
||||
override fun getTypeConstructor() = typeConstructor
|
||||
override fun getTypeConstructor(): TypeConstructor = typeConstructor
|
||||
|
||||
override fun getKind() = kind
|
||||
|
||||
@@ -95,7 +96,7 @@ public class DeserializedClassDescriptor(
|
||||
|
||||
override fun getAnnotations() = annotations
|
||||
|
||||
override fun getUnsubstitutedMemberScope() = memberScope
|
||||
override fun getUnsubstitutedMemberScope(): KtScope = memberScope
|
||||
|
||||
override fun getStaticScope() = staticScope
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import kotlin.reflect.jvm.internal.pcollections.HashPMap
|
||||
private var K_CLASS_CACHE = HashPMap.empty<String, Any>()
|
||||
|
||||
// This function is invoked on each reflection access to Java classes, properties, etc. Performance is critical here.
|
||||
fun <T : Any> getOrCreateKotlinClass(jClass: Class<T>): KClassImpl<T> {
|
||||
internal fun <T : Any> getOrCreateKotlinClass(jClass: Class<T>): KClassImpl<T> {
|
||||
val name = jClass.getName()
|
||||
val cached = K_CLASS_CACHE[name]
|
||||
if (cached is WeakReference<*>) {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
package kotlin.jvm.internal
|
||||
|
||||
private abstract class PrimitiveSpreadBuilder<T : Any>(private val size: Int) {
|
||||
public abstract class PrimitiveSpreadBuilder<T : Any>(private val size: Int) {
|
||||
abstract protected fun T.getSize(): Int
|
||||
|
||||
protected var position: Int = 0
|
||||
|
||||
@@ -57,9 +57,9 @@ fun buildTestSuite(
|
||||
return suite
|
||||
}
|
||||
|
||||
fun buildTestCase(ownerClass: Class<TestData>,
|
||||
methodNode: MethodNode,
|
||||
create: (MethodNode, Class<out Any?>, InterpreterResult?) -> TestCase): TestCase? {
|
||||
private fun buildTestCase(ownerClass: Class<TestData>,
|
||||
methodNode: MethodNode,
|
||||
create: (MethodNode, Class<out Any?>, InterpreterResult?) -> TestCase): TestCase? {
|
||||
var expected: InterpreterResult? = null
|
||||
for (method in ownerClass.getDeclaredMethods()) {
|
||||
if (method.getName() == methodNode.name) {
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ public class LibraryDependenciesCache(private val project: Project) {
|
||||
return Pair(libraries.toList(), sdks.toList())
|
||||
}
|
||||
|
||||
public fun getLibraryUsageIndex(): LibraryUsageIndex {
|
||||
private fun getLibraryUsageIndex(): LibraryUsageIndex {
|
||||
return CachedValuesManager.getManager(project).getCachedValue(project) {
|
||||
CachedValueProvider.Result(LibraryUsageIndex(), ProjectRootModificationTracker.getInstance(project))
|
||||
}!!
|
||||
|
||||
@@ -52,7 +52,7 @@ import org.jetbrains.kotlin.psi.KtElement
|
||||
import org.jetbrains.kotlin.psi.KtFile
|
||||
import org.jetbrains.kotlin.psi.KtSimpleNameExpression
|
||||
|
||||
fun createSingleImportAction(project: Project,
|
||||
internal fun createSingleImportAction(project: Project,
|
||||
editor: Editor,
|
||||
element: KtElement,
|
||||
descriptors: Collection<DeclarationDescriptor>): KotlinAddImportAction {
|
||||
@@ -70,7 +70,7 @@ fun createSingleImportAction(project: Project,
|
||||
return KotlinAddImportAction(project, editor, element, variants)
|
||||
}
|
||||
|
||||
fun createGroupedImportsAction(project: Project,
|
||||
internal fun createGroupedImportsAction(project: Project,
|
||||
editor: Editor,
|
||||
element: KtElement,
|
||||
autoImportDescription: String,
|
||||
|
||||
@@ -57,7 +57,7 @@ import java.util.*
|
||||
/**
|
||||
* Check possibility and perform fix for unresolved references.
|
||||
*/
|
||||
abstract class AutoImportFixBase<T: KtExpression>(expression: T, val diagnostics: Collection<Diagnostic>) :
|
||||
internal abstract class AutoImportFixBase<T: KtExpression>(expression: T, val diagnostics: Collection<Diagnostic>) :
|
||||
KotlinQuickFixAction<T>(expression), HighPriorityAction, HintAction {
|
||||
|
||||
protected constructor(expression: T, diagnostic: Diagnostic? = null) : this(expression, diagnostic.singletonOrEmptyList())
|
||||
@@ -185,7 +185,7 @@ abstract class AutoImportFixBase<T: KtExpression>(expression: T, val diagnostics
|
||||
}
|
||||
}
|
||||
|
||||
class AutoImportFix(expression: KtSimpleNameExpression, diagnostic: Diagnostic? = null) :
|
||||
internal class AutoImportFix(expression: KtSimpleNameExpression, diagnostic: Diagnostic? = null) :
|
||||
AutoImportFixBase<KtSimpleNameExpression>(expression, diagnostic) {
|
||||
override fun getCallTypeAndReceiver() = CallTypeAndReceiver.detect(element)
|
||||
|
||||
@@ -226,7 +226,7 @@ class AutoImportFix(expression: KtSimpleNameExpression, diagnostic: Diagnostic?
|
||||
}
|
||||
}
|
||||
|
||||
class MissingInvokeAutoImportFix(expression: KtExpression, diagnostic: Diagnostic) :
|
||||
internal class MissingInvokeAutoImportFix(expression: KtExpression, diagnostic: Diagnostic) :
|
||||
AutoImportFixBase<KtExpression>(expression, diagnostic) {
|
||||
override fun getImportNames() = OperatorNameConventions.INVOKE.singletonList()
|
||||
|
||||
@@ -242,7 +242,7 @@ class MissingInvokeAutoImportFix(expression: KtExpression, diagnostic: Diagnosti
|
||||
}
|
||||
}
|
||||
|
||||
class MissingArrayAccessorAutoImportFix(element: KtArrayAccessExpression, diagnostic: Diagnostic) :
|
||||
internal class MissingArrayAccessorAutoImportFix(element: KtArrayAccessExpression, diagnostic: Diagnostic) :
|
||||
AutoImportFixBase<KtArrayAccessExpression>(element, diagnostic) {
|
||||
override fun getImportNames(): Collection<Name> {
|
||||
val name = if (diagnostics.first().factory == Errors.NO_GET_METHOD) {
|
||||
@@ -275,7 +275,7 @@ class MissingArrayAccessorAutoImportFix(element: KtArrayAccessExpression, diagno
|
||||
}
|
||||
}
|
||||
|
||||
class MissingDelegateAccessorsAutoImportFix(element: KtExpression, diagnostics: Collection<Diagnostic>) :
|
||||
internal class MissingDelegateAccessorsAutoImportFix(element: KtExpression, diagnostics: Collection<Diagnostic>) :
|
||||
AutoImportFixBase<KtExpression>(element, diagnostics) {
|
||||
override fun getImportNames(): Collection<Name> {
|
||||
return diagnostics.map {
|
||||
@@ -314,7 +314,7 @@ class MissingDelegateAccessorsAutoImportFix(element: KtExpression, diagnostics:
|
||||
}
|
||||
}
|
||||
|
||||
class MissingComponentsAutoImportFix(element: KtExpression, diagnostics: Collection<Diagnostic>) :
|
||||
internal class MissingComponentsAutoImportFix(element: KtExpression, diagnostics: Collection<Diagnostic>) :
|
||||
AutoImportFixBase<KtExpression>(element, diagnostics) {
|
||||
override fun getImportNames() = diagnostics.map { Name.identifier(Errors.COMPONENT_FUNCTION_MISSING.cast(it).a.identifier) }
|
||||
|
||||
|
||||
+1
-1
@@ -159,7 +159,7 @@ class CallableBuilder(val config: CallableBuilderConfiguration) {
|
||||
fun computeTypeCandidates(typeInfo: TypeInfo): List<TypeCandidate> =
|
||||
typeCandidates.getOrPut(typeInfo) { typeInfo.getPossibleTypes(this).map { TypeCandidate(it) } }
|
||||
|
||||
fun computeTypeCandidates(
|
||||
private fun computeTypeCandidates(
|
||||
typeInfo: TypeInfo,
|
||||
substitutions: List<JetTypeSubstitution>,
|
||||
scope: LexicalScope): List<TypeCandidate> {
|
||||
|
||||
+1
-1
@@ -97,7 +97,7 @@ public class MoveKotlinFileHandler : MoveFileHandler() {
|
||||
return !JavaProjectRootsUtil.isOutsideJavaSourceRoot(element)
|
||||
}
|
||||
|
||||
fun findInternalUsages(file: KtFile, newParent: PsiDirectory): InternalUsagesWrapper {
|
||||
internal fun findInternalUsages(file: KtFile, newParent: PsiDirectory): InternalUsagesWrapper {
|
||||
val packageNameInfo = file.getPackageNameInfo(newParent, false)
|
||||
val usages = packageNameInfo?.let { file.getInternalReferencesToUpdateOnPackageNameChange(it) } ?: emptyList()
|
||||
return InternalUsagesWrapper(file, usages)
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.intellij.psi.PsiComment
|
||||
import com.intellij.psi.PsiNamedElement
|
||||
import com.intellij.refactoring.JavaRefactoringSettings
|
||||
import com.intellij.refactoring.classMembers.AbstractMemberInfoModel
|
||||
import com.intellij.refactoring.classMembers.MemberInfoModel
|
||||
import com.intellij.refactoring.memberPullUp.PullUpProcessor
|
||||
import com.intellij.refactoring.util.DocCommentPolicy
|
||||
import org.jetbrains.kotlin.asJava.toLightClass
|
||||
@@ -88,7 +89,8 @@ public class KotlinPullUpDialog(
|
||||
|
||||
override fun getSuperClass() = super.getSuperClass()
|
||||
|
||||
override fun createMemberInfoModel() = MemberInfoModelImpl()
|
||||
override fun createMemberInfoModel(): MemberInfoModel<KtNamedDeclaration, KotlinMemberInfo> =
|
||||
MemberInfoModelImpl()
|
||||
|
||||
override fun getPreselection() = mySuperClasses.firstOrNull { !it.isInterfaceClass() } ?: mySuperClasses.firstOrNull()
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ class Converter private constructor(
|
||||
|
||||
public val specialContext: PsiElement? = personalState.specialContext
|
||||
|
||||
public val referenceSearcher: CachingReferenceSearcher = CachingReferenceSearcher(services.referenceSearcher)
|
||||
public val referenceSearcher: ReferenceSearcher = CachingReferenceSearcher(services.referenceSearcher)
|
||||
|
||||
public val propertyDetectionCache = PropertyDetectionCache(this)
|
||||
|
||||
|
||||
@@ -27,7 +27,8 @@ import org.jetbrains.kotlin.psi.KtSimpleNameExpression
|
||||
class FieldToPropertyProcessing(val field: PsiField, val propertyName: String, val isNullable: Boolean) : UsageProcessing {
|
||||
override val targetElement: PsiElement get() = this.field
|
||||
|
||||
override val convertedCodeProcessor = if (field.getName() != propertyName) MyConvertedCodeProcessor() else null
|
||||
override val convertedCodeProcessor: ConvertedCodeProcessor? =
|
||||
if (field.getName() != propertyName) MyConvertedCodeProcessor() else null
|
||||
|
||||
override var javaCodeProcessor = if (field.hasModifierProperty(PsiModifier.PRIVATE))
|
||||
null
|
||||
|
||||
@@ -694,7 +694,7 @@ private fun hasKotlinDirtyOrRemovedFiles(
|
||||
return chunk.getTargets().any { !KotlinSourceFileCollector.getRemovedKotlinFiles(dirtyFilesHolder, it).isEmpty() }
|
||||
}
|
||||
|
||||
private open class GeneratedFile(
|
||||
public open class GeneratedFile internal constructor(
|
||||
val target: ModuleBuildTarget,
|
||||
val sourceFiles: Collection<File>,
|
||||
val outputFile: File
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.jetbrains.annotations.TestOnly
|
||||
import org.jetbrains.kotlin.utils.Printer
|
||||
import java.io.File
|
||||
|
||||
abstract class BasicMap<K : Comparable<K>, V>(
|
||||
internal abstract class BasicMap<K : Comparable<K>, V>(
|
||||
storageFile: File,
|
||||
keyDescriptor: KeyDescriptor<K>,
|
||||
valueExternalizer: DataExternalizer<V>
|
||||
@@ -64,7 +64,7 @@ abstract class BasicMap<K : Comparable<K>, V>(
|
||||
protected abstract fun dumpValue(value: V): String
|
||||
}
|
||||
|
||||
public abstract class BasicStringMap<V>(
|
||||
internal abstract class BasicStringMap<V>(
|
||||
storageFile: File,
|
||||
keyDescriptor: KeyDescriptor<String>,
|
||||
valueExternalizer: DataExternalizer<V>
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
|
||||
abstract class SourceInfoAwareJsNode extends AbstractNode {
|
||||
public abstract class SourceInfoAwareJsNode extends AbstractNode {
|
||||
private Object source;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.jetbrains.kotlin.resolve.descriptorUtil.builtIns
|
||||
import org.jetbrains.kotlin.types.TypeUtils
|
||||
import org.jetbrains.kotlin.types.typeUtil.isSubtypeOf
|
||||
|
||||
private abstract class AbstractNativeAnnotationsChecker(private val requiredAnnotation: PredefinedAnnotation) : DeclarationChecker {
|
||||
internal abstract class AbstractNativeAnnotationsChecker(private val requiredAnnotation: PredefinedAnnotation) : DeclarationChecker {
|
||||
|
||||
open fun additionalCheck(declaration: KtNamedFunction, descriptor: FunctionDescriptor, diagnosticHolder: DiagnosticSink) {}
|
||||
|
||||
@@ -63,9 +63,9 @@ private abstract class AbstractNativeAnnotationsChecker(private val requiredAnno
|
||||
}
|
||||
}
|
||||
|
||||
public class NativeInvokeChecker : AbstractNativeAnnotationsChecker(PredefinedAnnotation.NATIVE_INVOKE)
|
||||
internal class NativeInvokeChecker : AbstractNativeAnnotationsChecker(PredefinedAnnotation.NATIVE_INVOKE)
|
||||
|
||||
private abstract class AbstractNativeIndexerChecker(
|
||||
internal abstract class AbstractNativeIndexerChecker(
|
||||
requiredAnnotation: PredefinedAnnotation,
|
||||
private val indexerKind: String,
|
||||
private val requiredParametersCount: Int
|
||||
@@ -95,7 +95,7 @@ private abstract class AbstractNativeIndexerChecker(
|
||||
}
|
||||
}
|
||||
|
||||
public class NativeGetterChecker : AbstractNativeIndexerChecker(PredefinedAnnotation.NATIVE_GETTER, "getter", requiredParametersCount = 1) {
|
||||
internal class NativeGetterChecker : AbstractNativeIndexerChecker(PredefinedAnnotation.NATIVE_GETTER, "getter", requiredParametersCount = 1) {
|
||||
override fun additionalCheck(declaration: KtNamedFunction, descriptor: FunctionDescriptor, diagnosticHolder: DiagnosticSink) {
|
||||
super.additionalCheck(declaration, descriptor, diagnosticHolder)
|
||||
|
||||
@@ -106,7 +106,7 @@ public class NativeGetterChecker : AbstractNativeIndexerChecker(PredefinedAnnota
|
||||
}
|
||||
}
|
||||
|
||||
public class NativeSetterChecker : AbstractNativeIndexerChecker(PredefinedAnnotation.NATIVE_SETTER, "setter", requiredParametersCount = 2) {
|
||||
internal class NativeSetterChecker : AbstractNativeIndexerChecker(PredefinedAnnotation.NATIVE_SETTER, "setter", requiredParametersCount = 2) {
|
||||
override fun additionalCheck(declaration: KtNamedFunction, descriptor: FunctionDescriptor, diagnosticHolder: DiagnosticSink) {
|
||||
super.additionalCheck(declaration, descriptor, diagnosticHolder)
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ import org.jetbrains.kotlin.js.translate.utils.jsAstUtils.*
|
||||
* It's desirable to create temporary var only if node can have side effect,
|
||||
* and precedes inline call (in JavaScript evaluation order).
|
||||
*/
|
||||
class ExpressionDecomposer private constructor(
|
||||
internal class ExpressionDecomposer private constructor(
|
||||
private val scope: JsScope,
|
||||
private val containsExtractable: Set<JsNode>,
|
||||
private val containsNodeWithSideEffect: Set<JsNode>
|
||||
@@ -337,7 +337,7 @@ class ExpressionDecomposer private constructor(
|
||||
*
|
||||
* For example, won't visit [JsBlock] statements, but will visit test expression of [JsWhile].
|
||||
*/
|
||||
private open class JsExpressionVisitor() : JsVisitorWithContextImpl() {
|
||||
internal open class JsExpressionVisitor() : JsVisitorWithContextImpl() {
|
||||
|
||||
override fun visit(x: JsBlock, ctx: JsContext<*>): Boolean = false
|
||||
override fun visit(x: JsTry, ctx: JsContext<*>): Boolean = false
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import org.jetbrains.kotlin.js.test.AbstractSingleFileTranslationWithDirectivesT
|
||||
import org.jetbrains.kotlin.js.test.MultipleModulesTranslationTest
|
||||
import org.jetbrains.kotlin.js.test.SingleFileTranslationTest
|
||||
|
||||
private abstract class AbstractBlackBoxTest(d: String) : SingleFileTranslationTest(d) {
|
||||
public abstract class AbstractBlackBoxTest(d: String) : SingleFileTranslationTest(d) {
|
||||
override fun doTest(filename: String) = checkBlackBoxIsOkByPath(filename)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ public abstract class AbstractAnnotationProcessorBoxTest : CodegenTestCase() {
|
||||
return "plugins/annotation-collector/testData/codegen/"
|
||||
}
|
||||
|
||||
fun createTestEnvironment(supportInheritedAnnotations: Boolean): AnnotationCollectorExtensionForTests {
|
||||
private fun createTestEnvironment(supportInheritedAnnotations: Boolean): AnnotationCollectorExtensionForTests {
|
||||
val configuration = JetTestUtils.compilerConfigurationForTests(ConfigurationKind.ALL, TestJdkKind.MOCK_JDK)
|
||||
val environment = KotlinCoreEnvironment.createForTests(getTestRootDisposable()!!, configuration, EnvironmentConfigFiles.JVM_CONFIG_FILES)
|
||||
val project = environment.project
|
||||
|
||||
Reference in New Issue
Block a user