|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jetbrains.kotlin.backend.common.DataClassMethodGenerator
public abstract class DataClassMethodGenerator
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.
| Constructor Summary | |
|---|---|
DataClassMethodGenerator(JetClassOrObject declaration,
BindingContext bindingContext)
|
|
| Method Summary | |
|---|---|
void |
generate()
|
protected abstract void |
generateComponentFunction(FunctionDescriptor function,
ValueParameterDescriptor parameter)
|
protected abstract void |
generateCopyFunction(FunctionDescriptor function,
java.util.List<JetParameter> constructorParameters)
|
protected abstract void |
generateEqualsMethod(FunctionDescriptor function,
java.util.List<PropertyDescriptor> properties)
|
protected abstract void |
generateHashCodeMethod(FunctionDescriptor function,
java.util.List<PropertyDescriptor> properties)
|
protected abstract void |
generateToStringMethod(FunctionDescriptor function,
java.util.List<PropertyDescriptor> properties)
|
protected ClassDescriptor |
getClassDescriptor()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DataClassMethodGenerator(JetClassOrObject declaration,
BindingContext bindingContext)
| Method Detail |
|---|
public void generate()
protected abstract void generateComponentFunction(@NotNull
FunctionDescriptor function,
@NotNull
ValueParameterDescriptor parameter)
protected abstract void generateCopyFunction(@NotNull
FunctionDescriptor function,
@NotNull
java.util.List<JetParameter> constructorParameters)
protected abstract void generateToStringMethod(@NotNull
FunctionDescriptor function,
@NotNull
java.util.List<PropertyDescriptor> properties)
protected abstract void generateHashCodeMethod(@NotNull
FunctionDescriptor function,
@NotNull
java.util.List<PropertyDescriptor> properties)
protected abstract void generateEqualsMethod(@NotNull
FunctionDescriptor function,
@NotNull
java.util.List<PropertyDescriptor> properties)
@NotNull protected ClassDescriptor getClassDescriptor()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||