org.jetbrains.kotlin.backend.common
Class DataClassMethodGenerator
java.lang.Object
org.jetbrains.kotlin.backend.common.DataClassMethodGenerator
public abstract class DataClassMethodGenerator
- extends java.lang.Object
A platform-independent logic for generating data class synthetic methods.
TODO: data class with zero components gets no toString/equals/hashCode methods. This is inconsistent and should be
changed here with the platform backends adopted.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataClassMethodGenerator
public DataClassMethodGenerator(KtClassOrObject declaration,
BindingContext bindingContext)
generate
public void generate()
generateComponentFunction
protected abstract void generateComponentFunction(@NotNull
FunctionDescriptor function,
@NotNull
ValueParameterDescriptor parameter)
generateCopyFunction
protected abstract void generateCopyFunction(@NotNull
FunctionDescriptor function,
@NotNull
java.util.List<KtParameter> constructorParameters)
generateToStringMethod
protected abstract void generateToStringMethod(@NotNull
FunctionDescriptor function,
@NotNull
java.util.List<PropertyDescriptor> properties)
generateHashCodeMethod
protected abstract void generateHashCodeMethod(@NotNull
FunctionDescriptor function,
@NotNull
java.util.List<PropertyDescriptor> properties)
generateEqualsMethod
protected abstract void generateEqualsMethod(@NotNull
FunctionDescriptor function,
@NotNull
java.util.List<PropertyDescriptor> properties)
getClassDescriptor
@NotNull
protected ClassDescriptor getClassDescriptor()