From c7916f74964246bee4d256c106b01c7e317e6c10 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Tue, 17 Mar 2015 19:54:11 +0100 Subject: default objects -> companion objects --- src/Formats/HtmlTemplateService.kt | 2 +- src/Formats/StructuredFormatService.kt | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/Formats') diff --git a/src/Formats/HtmlTemplateService.kt b/src/Formats/HtmlTemplateService.kt index 859c37b7..246bd11e 100644 --- a/src/Formats/HtmlTemplateService.kt +++ b/src/Formats/HtmlTemplateService.kt @@ -4,7 +4,7 @@ public trait HtmlTemplateService { fun appendHeader(to: StringBuilder, title: String?) fun appendFooter(to: StringBuilder) - default object { + companion object { public fun default(css: String? = null): HtmlTemplateService { return object : HtmlTemplateService { override fun appendFooter(to: StringBuilder) { diff --git a/src/Formats/StructuredFormatService.kt b/src/Formats/StructuredFormatService.kt index 0e01db4d..a3803011 100644 --- a/src/Formats/StructuredFormatService.kt +++ b/src/Formats/StructuredFormatService.kt @@ -286,8 +286,8 @@ public abstract class StructuredFormatService(locationService: LocationService, appendSection(location, "Constructors", node.members(DocumentationNode.Kind.Constructor), node, to) appendSection(location, "Properties", node.members(DocumentationNode.Kind.Property), node, to) appendSection(location, "Functions", node.members(DocumentationNode.Kind.Function), node, to) - appendSection(location, "Default Object Properties", node.members(DocumentationNode.Kind.DefaultObjectProperty), node, to) - appendSection(location, "Default Object Functions", node.members(DocumentationNode.Kind.DefaultObjectFunction), node, to) + appendSection(location, "Companion Object Properties", node.members(DocumentationNode.Kind.CompanionObjectProperty), node, to) + appendSection(location, "Companion Object Functions", node.members(DocumentationNode.Kind.CompanionObjectFunction), node, to) appendSection(location, "Enum Values", node.members(DocumentationNode.Kind.EnumItem), node, to) appendSection(location, "Other members", node.members.filter { it.kind !in setOf( @@ -300,16 +300,16 @@ public abstract class StructuredFormatService(locationService: LocationService, DocumentationNode.Kind.Property, DocumentationNode.Kind.Package, DocumentationNode.Kind.Function, - DocumentationNode.Kind.DefaultObjectProperty, - DocumentationNode.Kind.DefaultObjectFunction, + DocumentationNode.Kind.CompanionObjectProperty, + DocumentationNode.Kind.CompanionObjectFunction, DocumentationNode.Kind.ExternalClass, DocumentationNode.Kind.EnumItem ) }, node, to) appendSection(location, "Extension Properties", node.extensions.filter { it.kind == DocumentationNode.Kind.Property }, node, to) appendSection(location, "Extension Functions", node.extensions.filter { it.kind == DocumentationNode.Kind.Function }, node, to) - appendSection(location, "Default Object Extension Properties", node.extensions.filter { it.kind == DocumentationNode.Kind.DefaultObjectProperty }, node, to) - appendSection(location, "Default Object Extension Functions", node.extensions.filter { it.kind == DocumentationNode.Kind.DefaultObjectFunction }, node, to) + appendSection(location, "Companion Object Extension Properties", node.extensions.filter { it.kind == DocumentationNode.Kind.CompanionObjectProperty }, node, to) + appendSection(location, "Companion Object Extension Functions", node.extensions.filter { it.kind == DocumentationNode.Kind.CompanionObjectFunction }, node, to) appendSection(location, "Inheritors", node.inheritors.filter { it.kind != DocumentationNode.Kind.EnumItem }, node, to) appendSection(location, "Links", node.links, node, to) -- cgit