Exclude nested classes of private classes from ABI classes
This commit is contained in:
@@ -119,6 +119,10 @@ class DescriptorSerializer private constructor(
|
||||
typeAliasProto(descriptor)?.let { builder.addTypeAlias(it) }
|
||||
}
|
||||
else {
|
||||
if (descriptor is ClassDescriptor && !extension.shouldSerializeNestedClass(descriptor)) {
|
||||
continue
|
||||
}
|
||||
|
||||
val name = getSimpleNameIndex(descriptor.name)
|
||||
if (isEnumEntry(descriptor)) {
|
||||
builder.addEnumEntry(enumEntryProto(descriptor as ClassDescriptor))
|
||||
|
||||
@@ -25,6 +25,7 @@ abstract class SerializerExtension {
|
||||
open fun shouldSerializeFunction(descriptor: FunctionDescriptor): Boolean = true
|
||||
open fun shouldSerializeProperty(descriptor: PropertyDescriptor): Boolean = true
|
||||
open fun shouldSerializeTypeAlias(descriptor: TypeAliasDescriptor): Boolean = true
|
||||
open fun shouldSerializeNestedClass(descriptor: ClassDescriptor): Boolean = true
|
||||
|
||||
interface ClassMembersProducer {
|
||||
fun getCallableMembers(classDescriptor: ClassDescriptor): Collection<CallableMemberDescriptor>
|
||||
|
||||
Reference in New Issue
Block a user