Cleanup: get rid of effective visibility warnings

This commit is contained in:
Mikhail Glukhikh
2015-10-23 16:54:40 +03:00
committed by Mikhail Glukhikh
parent 932542891b
commit f8a70302ac
34 changed files with 60 additions and 56 deletions
@@ -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))
}
@@ -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>()
@@ -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) {
@@ -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>()
@@ -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 {
@@ -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>>()
@@ -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"))