Modify merge function value hashCode to toString in MemberRulesData, FieldRulesData, MethodRulesData, ConstructorRulesData

This commit is contained in:
2022-09-13 02:26:40 +08:00
parent ed408fd0f2
commit c0cfeb972b
4 changed files with 12 additions and 5 deletions

View File

@@ -51,5 +51,7 @@ internal class ConstructorRulesData internal constructor(
get() = super.isInitializeOfSuper || paramTypes != null || paramCount >= 0 ||
paramCountRange.isEmpty().not() || paramCountConditions != null
override fun hashCode(other: Any?) = super.hashCode(other) + "[$paramTypes][$paramCount][$paramCountRange]".hashCode()
override fun hashCode(other: Any?) = super.hashCode(other) + toString().hashCode()
override fun toString() = "[$paramTypes][$paramCount][$paramCountRange]"
}

View File

@@ -47,5 +47,7 @@ internal class FieldRulesData internal constructor(
override val isInitialize get() = super.isInitializeOfSuper || name.isNotBlank() || nameConditions != null || type != null
override fun hashCode(other: Any?) = super.hashCode(other) + "[$name][$nameConditions][$type]".hashCode()
override fun hashCode(other: Any?) = super.hashCode(other) + toString().hashCode()
override fun toString() = "[$name][$nameConditions][$type]"
}

View File

@@ -62,5 +62,7 @@ internal open class MemberRulesData internal constructor(
override val isInitialize get() = isInitializeOfSuper || isInitializeOfMatch
override fun hashCode(other: Any?) = super.hashCode(other) + "[$isFindInSuper][$matchIndex][$matchCountRange]".hashCode()
override fun hashCode(other: Any?) = super.hashCode(other) + toString().hashCode()
override fun toString() = "[$isFindInSuper][$matchIndex][$matchCountRange]"
}

View File

@@ -58,6 +58,7 @@ internal class MethodRulesData internal constructor(
get() = super.isInitializeOfSuper || name.isNotBlank() || nameConditions != null || paramTypes != null ||
paramCount >= 0 || paramCountRange.isEmpty().not() || paramCountConditions != null || returnType != null
override fun hashCode(other: Any?) =
super.hashCode(other) + "[$name][$nameConditions][$paramTypes][$paramCount][$paramCountRange][$returnType]".hashCode()
override fun hashCode(other: Any?) = super.hashCode(other) + toString().hashCode()
override fun toString() = "[$name][$nameConditions][$paramTypes][$paramCount][$paramCountRange][$returnType]"
}