Proper semantics for former data classes

This commit is contained in:
Andrey Breslav
2015-10-19 22:42:15 +03:00
parent 49033e0002
commit 18524ea8ec
@@ -34,21 +34,14 @@ public class AnnotationProcessorStub : AbstractProcessor() {
abstract class AnnotatedElementDescriptor(public val classFqName: String)
class AnnotatedClassDescriptor(classFqName: String) : AnnotatedElementDescriptor(classFqName) {
override fun equals(other: Any?) = other is AnnotatedClassDescriptor
override fun hashCode() = 0
}
class AnnotatedClassDescriptor(classFqName: String) : AnnotatedElementDescriptor(classFqName)
class AnnotatedMethodDescriptor(classFqName: String, public val methodName: String) : AnnotatedElementDescriptor(classFqName) {
override fun equals(other: Any?) = other is AnnotatedMethodDescriptor && methodName == other.methodName
override fun hashCode() = methodName.hashCode()
}
class AnnotatedConstructorDescriptor(classFqName: String) : AnnotatedElementDescriptor(classFqName) {
override fun equals(other: Any?) = other is AnnotatedConstructorDescriptor
class AnnotatedConstructorDescriptor(classFqName: String) : AnnotatedElementDescriptor(classFqName)
override fun hashCode() = 0
}
class AnnotatedFieldDescriptor(classFqName: String, public val fieldName: String) : AnnotatedElementDescriptor(classFqName) {
override fun equals(other: Any?) = other is AnnotatedFieldDescriptor && fieldName == other.fieldName