diff options
author | Kamil Doległo <kamilok1965@interia.pl> | 2020-03-16 14:33:38 +0100 |
---|---|---|
committer | Kamil Doległo <kamilok1965@users.noreply.github.com> | 2020-03-16 14:35:12 +0100 |
commit | 996feefe717ac623daabaadda71b5b9d2bbe1cf1 (patch) | |
tree | fca8d99c2cf4f9dcc64159b4e1ebe5644f2bd81b /core/src/main/kotlin/model/Documentable.kt | |
parent | cd38992a28a8b16cd91661f05829610d1373e47c (diff) | |
download | dokka-996feefe717ac623daabaadda71b5b9d2bbe1cf1.tar.gz dokka-996feefe717ac623daabaadda71b5b9d2bbe1cf1.tar.bz2 dokka-996feefe717ac623daabaadda71b5b9d2bbe1cf1.zip |
Rename Documentables to avoid name conflicts
Diffstat (limited to 'core/src/main/kotlin/model/Documentable.kt')
-rw-r--r-- | core/src/main/kotlin/model/Documentable.kt | 190 |
1 files changed, 95 insertions, 95 deletions
diff --git a/core/src/main/kotlin/model/Documentable.kt b/core/src/main/kotlin/model/Documentable.kt index b697f4e4..22930bf2 100644 --- a/core/src/main/kotlin/model/Documentable.kt +++ b/core/src/main/kotlin/model/Documentable.kt @@ -48,9 +48,9 @@ interface WithExpectActual { } interface WithScope { - val functions: List<Function> - val properties: List<Property> - val classlikes: List<Classlike> + val functions: List<DFunction> + val properties: List<DProperty> + val classlikes: List<DClasslike> } interface WithVisibility { @@ -81,15 +81,15 @@ sealed class JavaModifier(name: String) : Modifier(name) { } interface WithCompanion { - val companion: Object? + val companion: DObject? } interface WithConstructors { - val constructors: List<Function> + val constructors: List<DFunction> } interface WithGenerics { - val generics: List<TypeParameter> + val generics: List<DTypeParameter> } interface WithSupertypes { @@ -97,232 +97,232 @@ interface WithSupertypes { } interface Callable : WithVisibility, WithType, WithAbstraction, WithExpectActual { - val receiver: Parameter? + val receiver: DParameter? } -abstract class Classlike : Documentable(), WithScope, WithVisibility, WithExpectActual +abstract class DClasslike : Documentable(), WithScope, WithVisibility, WithExpectActual -data class Module( +data class DModule( override val name: String, - val packages: List<Package>, + val packages: List<DPackage>, override val documentation: PlatformDependent<DocumentationNode>, override val platformData: List<PlatformData>, - override val extra: PropertyContainer<Module> = PropertyContainer.empty() -) : Documentable(), WithExtraProperties<Module> { + override val extra: PropertyContainer<DModule> = PropertyContainer.empty() +) : Documentable(), WithExtraProperties<DModule> { override val dri: DRI = DRI.topLevel override val children: List<Documentable> get() = packages - override fun withNewExtras(newExtras: PropertyContainer<Module>) = copy(extra = newExtras) + override fun withNewExtras(newExtras: PropertyContainer<DModule>) = copy(extra = newExtras) } -data class Package( +data class DPackage( override val dri: DRI, - override val functions: List<Function>, - override val properties: List<Property>, - override val classlikes: List<Classlike>, + override val functions: List<DFunction>, + override val properties: List<DProperty>, + override val classlikes: List<DClasslike>, override val documentation: PlatformDependent<DocumentationNode>, override val platformData: List<PlatformData>, - override val extra: PropertyContainer<Package> = PropertyContainer.empty() -) : Documentable(), WithScope, WithExtraProperties<Package> { + override val extra: PropertyContainer<DPackage> = PropertyContainer.empty() +) : Documentable(), WithScope, WithExtraProperties<DPackage> { override val name = dri.packageName.orEmpty() override val children: List<Documentable> get() = (properties + functions + classlikes) as List<Documentable> - override fun withNewExtras(newExtras: PropertyContainer<Package>) = copy(extra = newExtras) + override fun withNewExtras(newExtras: PropertyContainer<DPackage>) = copy(extra = newExtras) } -data class Class( +data class DClass( override val dri: DRI, override val name: String, - override val constructors: List<Function>, - override val functions: List<Function>, - override val properties: List<Property>, - override val classlikes: List<Classlike>, + override val constructors: List<DFunction>, + override val functions: List<DFunction>, + override val properties: List<DProperty>, + override val classlikes: List<DClasslike>, override val sources: PlatformDependent<DocumentableSource>, override val visibility: PlatformDependent<Visibility>, - override val companion: Object?, - override val generics: List<TypeParameter>, + override val companion: DObject?, + override val generics: List<DTypeParameter>, override val supertypes: PlatformDependent<List<DRI>>, override val documentation: PlatformDependent<DocumentationNode>, override val modifier: Modifier, override val platformData: List<PlatformData>, - override val extra: PropertyContainer<Class> = PropertyContainer.empty() -) : Classlike(), WithAbstraction, WithCompanion, WithConstructors, WithGenerics, WithSupertypes, - WithExtraProperties<Class> { + override val extra: PropertyContainer<DClass> = PropertyContainer.empty() +) : DClasslike(), WithAbstraction, WithCompanion, WithConstructors, WithGenerics, WithSupertypes, + WithExtraProperties<DClass> { override val children: List<Documentable> get() = (functions + properties + classlikes + constructors) as List<Documentable> - override fun withNewExtras(newExtras: PropertyContainer<Class>) = copy(extra = newExtras) + override fun withNewExtras(newExtras: PropertyContainer<DClass>) = copy(extra = newExtras) } -data class Enum( +data class DEnum( override val dri: DRI, override val name: String, - val entries: List<EnumEntry>, + val entries: List<DEnumEntry>, override val documentation: PlatformDependent<DocumentationNode>, override val sources: PlatformDependent<DocumentableSource>, - override val functions: List<Function>, - override val properties: List<Property>, - override val classlikes: List<Classlike>, + override val functions: List<DFunction>, + override val properties: List<DProperty>, + override val classlikes: List<DClasslike>, override val visibility: PlatformDependent<Visibility>, - override val companion: Object?, - override val constructors: List<Function>, + override val companion: DObject?, + override val constructors: List<DFunction>, override val supertypes: PlatformDependent<List<DRI>>, override val platformData: List<PlatformData>, - override val extra: PropertyContainer<Enum> = PropertyContainer.empty() -) : Classlike(), WithCompanion, WithConstructors, WithSupertypes, WithExtraProperties<Enum> { + override val extra: PropertyContainer<DEnum> = PropertyContainer.empty() +) : DClasslike(), WithCompanion, WithConstructors, WithSupertypes, WithExtraProperties<DEnum> { override val children: List<Documentable> get() = (entries + functions + properties + classlikes + constructors) as List<Documentable> - override fun withNewExtras(newExtras: PropertyContainer<Enum>) = copy(extra = newExtras) + override fun withNewExtras(newExtras: PropertyContainer<DEnum>) = copy(extra = newExtras) } -data class EnumEntry( +data class DEnumEntry( override val dri: DRI, override val name: String, override val documentation: PlatformDependent<DocumentationNode>, - override val functions: List<Function>, - override val properties: List<Property>, - override val classlikes: List<Classlike>, + override val functions: List<DFunction>, + override val properties: List<DProperty>, + override val classlikes: List<DClasslike>, override val platformData: List<PlatformData>, - override val extra: PropertyContainer<EnumEntry> = PropertyContainer.empty() -) : Documentable(), WithScope, WithExtraProperties<EnumEntry> { + override val extra: PropertyContainer<DEnumEntry> = PropertyContainer.empty() +) : Documentable(), WithScope, WithExtraProperties<DEnumEntry> { override val children: List<Documentable> get() = (functions + properties + classlikes) as List<Documentable> - override fun withNewExtras(newExtras: PropertyContainer<EnumEntry>) = copy(extra = newExtras) + override fun withNewExtras(newExtras: PropertyContainer<DEnumEntry>) = copy(extra = newExtras) } -data class Function( +data class DFunction( override val dri: DRI, override val name: String, val isConstructor: Boolean, - val parameters: List<Parameter>, + val parameters: List<DParameter>, override val documentation: PlatformDependent<DocumentationNode>, override val sources: PlatformDependent<DocumentableSource>, override val visibility: PlatformDependent<Visibility>, override val type: Bound, - override val generics: List<TypeParameter>, - override val receiver: Parameter?, + override val generics: List<DTypeParameter>, + override val receiver: DParameter?, override val modifier: Modifier, override val platformData: List<PlatformData>, - override val extra: PropertyContainer<Function> = PropertyContainer.empty() -) : Documentable(), Callable, WithGenerics, WithExtraProperties<Function> { + override val extra: PropertyContainer<DFunction> = PropertyContainer.empty() +) : Documentable(), Callable, WithGenerics, WithExtraProperties<DFunction> { override val children: List<Documentable> get() = parameters - override fun withNewExtras(newExtras: PropertyContainer<Function>) = copy(extra = newExtras) + override fun withNewExtras(newExtras: PropertyContainer<DFunction>) = copy(extra = newExtras) } -data class Interface( +data class DInterface( override val dri: DRI, override val name: String, override val documentation: PlatformDependent<DocumentationNode>, override val sources: PlatformDependent<DocumentableSource>, - override val functions: List<Function>, - override val properties: List<Property>, - override val classlikes: List<Classlike>, + override val functions: List<DFunction>, + override val properties: List<DProperty>, + override val classlikes: List<DClasslike>, override val visibility: PlatformDependent<Visibility>, - override val companion: Object?, - override val generics: List<TypeParameter>, + override val companion: DObject?, + override val generics: List<DTypeParameter>, override val supertypes: PlatformDependent<List<DRI>>, override val platformData: List<PlatformData>, - override val extra: PropertyContainer<Interface> = PropertyContainer.empty() -) : Classlike(), WithCompanion, WithGenerics, WithSupertypes, WithExtraProperties<Interface> { + override val extra: PropertyContainer<DInterface> = PropertyContainer.empty() +) : DClasslike(), WithCompanion, WithGenerics, WithSupertypes, WithExtraProperties<DInterface> { override val children: List<Documentable> get() = (functions + properties + classlikes) as List<Documentable> - override fun withNewExtras(newExtras: PropertyContainer<Interface>) = copy(extra = newExtras) + override fun withNewExtras(newExtras: PropertyContainer<DInterface>) = copy(extra = newExtras) } -data class Object( +data class DObject( override val name: String?, override val dri: DRI, override val documentation: PlatformDependent<DocumentationNode>, override val sources: PlatformDependent<DocumentableSource>, - override val functions: List<Function>, - override val properties: List<Property>, - override val classlikes: List<Classlike>, + override val functions: List<DFunction>, + override val properties: List<DProperty>, + override val classlikes: List<DClasslike>, override val visibility: PlatformDependent<Visibility>, override val supertypes: PlatformDependent<List<DRI>>, override val platformData: List<PlatformData>, - override val extra: PropertyContainer<Object> = PropertyContainer.empty() -) : Classlike(), WithSupertypes, WithExtraProperties<Object> { + override val extra: PropertyContainer<DObject> = PropertyContainer.empty() +) : DClasslike(), WithSupertypes, WithExtraProperties<DObject> { override val children: List<Documentable> get() = (functions + properties + classlikes) as List<Documentable> - override fun withNewExtras(newExtras: PropertyContainer<Object>) = copy(extra = newExtras) + override fun withNewExtras(newExtras: PropertyContainer<DObject>) = copy(extra = newExtras) } -data class Annotation( +data class DAnnotation( override val name: String, override val dri: DRI, override val documentation: PlatformDependent<DocumentationNode>, override val sources: PlatformDependent<DocumentableSource>, - override val functions: List<Function>, - override val properties: List<Property>, - override val classlikes: List<Classlike>, + override val functions: List<DFunction>, + override val properties: List<DProperty>, + override val classlikes: List<DClasslike>, override val visibility: PlatformDependent<Visibility>, - override val companion: Object?, - override val constructors: List<Function>, + override val companion: DObject?, + override val constructors: List<DFunction>, override val platformData: List<PlatformData>, - override val extra: PropertyContainer<Annotation> = PropertyContainer.empty() -) : Classlike(), WithCompanion, WithConstructors, WithExtraProperties<Annotation> { + override val extra: PropertyContainer<DAnnotation> = PropertyContainer.empty() +) : DClasslike(), WithCompanion, WithConstructors, WithExtraProperties<DAnnotation> { override val children: List<Documentable> get() = (functions + properties + classlikes + constructors) as List<Documentable> - override fun withNewExtras(newExtras: PropertyContainer<Annotation>) = copy(extra = newExtras) + override fun withNewExtras(newExtras: PropertyContainer<DAnnotation>) = copy(extra = newExtras) } -data class Property( +data class DProperty( override val dri: DRI, override val name: String, override val documentation: PlatformDependent<DocumentationNode>, override val sources: PlatformDependent<DocumentableSource>, override val visibility: PlatformDependent<Visibility>, override val type: Bound, - override val receiver: Parameter?, - val setter: Function?, - val getter: Function?, + override val receiver: DParameter?, + val setter: DFunction?, + val getter: DFunction?, override val modifier: Modifier, override val platformData: List<PlatformData>, - override val extra: PropertyContainer<Property> = PropertyContainer.empty() -) : Documentable(), Callable, WithExtraProperties<Property> { + override val extra: PropertyContainer<DProperty> = PropertyContainer.empty() +) : Documentable(), Callable, WithExtraProperties<DProperty> { override val children: List<Nothing> get() = emptyList() - override fun withNewExtras(newExtras: PropertyContainer<Property>) = copy(extra = newExtras) + override fun withNewExtras(newExtras: PropertyContainer<DProperty>) = copy(extra = newExtras) } // TODO: treat named Parameters and receivers differently -data class Parameter( +data class DParameter( override val dri: DRI, override val name: String?, override val documentation: PlatformDependent<DocumentationNode>, val type: Bound, override val platformData: List<PlatformData>, - override val extra: PropertyContainer<Parameter> = PropertyContainer.empty() -) : Documentable(), WithExtraProperties<Parameter> { + override val extra: PropertyContainer<DParameter> = PropertyContainer.empty() +) : Documentable(), WithExtraProperties<DParameter> { override val children: List<Nothing> get() = emptyList() - override fun withNewExtras(newExtras: PropertyContainer<Parameter>) = copy(extra = newExtras) + override fun withNewExtras(newExtras: PropertyContainer<DParameter>) = copy(extra = newExtras) } -data class TypeParameter( +data class DTypeParameter( override val dri: DRI, override val name: String, override val documentation: PlatformDependent<DocumentationNode>, val bounds: List<Bound>, override val platformData: List<PlatformData>, - override val extra: PropertyContainer<TypeParameter> = PropertyContainer.empty() -) : Documentable(), WithExtraProperties<TypeParameter> { + override val extra: PropertyContainer<DTypeParameter> = PropertyContainer.empty() +) : Documentable(), WithExtraProperties<DTypeParameter> { override val children: List<Nothing> get() = emptyList() - override fun withNewExtras(newExtras: PropertyContainer<TypeParameter>) = copy(extra = newExtras) + override fun withNewExtras(newExtras: PropertyContainer<DTypeParameter>) = copy(extra = newExtras) } sealed class Projection |