aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/model/doc
diff options
context:
space:
mode:
authorAndrzej Ratajczak <andrzej.ratajczak98@gmail.com>2020-01-17 16:05:36 +0100
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-02-06 10:53:43 +0100
commit356502980c217b7275971619fabb22acfe1a3d55 (patch)
treecb07b19a075cbbc332ca473727f0a6d69cda4347 /core/src/main/kotlin/model/doc
parent6085f6acaf90c1a82b1249878c70a871a52c64e5 (diff)
downloaddokka-356502980c217b7275971619fabb22acfe1a3d55.tar.gz
dokka-356502980c217b7275971619fabb22acfe1a3d55.tar.bz2
dokka-356502980c217b7275971619fabb22acfe1a3d55.zip
Changed model
Diffstat (limited to 'core/src/main/kotlin/model/doc')
-rw-r--r--core/src/main/kotlin/model/doc/TagWrapper.kt35
1 files changed, 11 insertions, 24 deletions
diff --git a/core/src/main/kotlin/model/doc/TagWrapper.kt b/core/src/main/kotlin/model/doc/TagWrapper.kt
index fa9031d7..9dda7c8f 100644
--- a/core/src/main/kotlin/model/doc/TagWrapper.kt
+++ b/core/src/main/kotlin/model/doc/TagWrapper.kt
@@ -11,36 +11,23 @@ sealed class TagWrapper(val root: DocTag) {
override fun hashCode(): Int = root.hashCode()
}
+sealed class NamedTagWrapper(root: DocTag, val name: String) : TagWrapper(root) {
+ override fun equals(other: Any?): Boolean = super.equals(other) && this.name == (other as NamedTagWrapper).name
+ override fun hashCode(): Int = super.hashCode() + name.hashCode()
+}
+
class Description(root: DocTag) : TagWrapper(root)
class Author(root: DocTag) : TagWrapper(root)
class Version(root: DocTag) : TagWrapper(root)
class Since(root: DocTag) : TagWrapper(root)
-class See(root: DocTag, val name: String) : TagWrapper(root) {
- override fun equals(other: Any?): Boolean = super.equals(other) && this.name == (other as See).name
- override fun hashCode(): Int = super.hashCode() + name.hashCode()
-}
-class Param(root: DocTag, val name: String) : TagWrapper(root) {
- override fun equals(other: Any?): Boolean = super.equals(other) && this.name == (other as Param).name
- override fun hashCode(): Int = super.hashCode() + name.hashCode()
-}
+class See(root: DocTag, name: String) : NamedTagWrapper(root, name)
+class Param(root: DocTag, name: String) : NamedTagWrapper(root, name)
class Return(root: DocTag) : TagWrapper(root)
class Receiver(root: DocTag) : TagWrapper(root)
class Constructor(root: DocTag) : TagWrapper(root)
-class Throws(root: DocTag, val name: String) : TagWrapper(root) {
- override fun equals(other: Any?): Boolean = super.equals(other) && this.name == (other as Throws).name
- override fun hashCode(): Int = super.hashCode() + name.hashCode()
-}
-class Sample(root: DocTag, val name: String) : TagWrapper(root) {
- override fun equals(other: Any?): Boolean = super.equals(other) && this.name == (other as Sample).name
- override fun hashCode(): Int = super.hashCode() + name.hashCode()
-}
+class Throws(root: DocTag, name: String) : NamedTagWrapper(root, name)
+class Sample(root: DocTag, name: String) : NamedTagWrapper(root, name)
class Deprecated(root: DocTag) : TagWrapper(root)
-class Property(root: DocTag, val name: String) : TagWrapper(root) {
- override fun equals(other: Any?): Boolean = super.equals(other) && this.name == (other as Property).name
- override fun hashCode(): Int = super.hashCode() + name.hashCode()
-}
+class Property(root: DocTag, name: String) : NamedTagWrapper(root, name)
class Suppress(root: DocTag) : TagWrapper(root)
-class CustomWrapperTag(root: DocTag, val name: String) : TagWrapper(root) {
- override fun equals(other: Any?): Boolean = super.equals(other) && this.name == (other as CustomWrapperTag).name
- override fun hashCode(): Int = super.hashCode() + name.hashCode()
-} \ No newline at end of file
+class CustomWrapperTag(root: DocTag, name: String) : NamedTagWrapper(root, name) \ No newline at end of file