Created
November 19, 2020 09:06
-
-
Save Mahoney/accc9252472e93632727d9c8a85815d2 to your computer and use it in GitHub Desktop.
kotlin data class compiled & decompiled to Java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package whatever; | |
import kotlin.Metadata; | |
import kotlin.jvm.internal.Intrinsics; | |
import org.jetbrains.annotations.NotNull; | |
import org.jetbrains.annotations.Nullable; | |
@Metadata( | |
mv = {1, 4, 0}, | |
bv = {1, 0, 3}, | |
k = 1, | |
d1 = {"\u0000\"\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0002\b\t\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0002\b\u0086\b\u0018\u00002\u00020\u0001B\u0017\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\b\u0010\u0004\u001a\u0004\u0018\u00010\u0003¢\u0006\u0002\u0010\u0005J\t\u0010\t\u001a\u00020\u0003HÆ\u0003J\u000b\u0010\n\u001a\u0004\u0018\u00010\u0003HÆ\u0003J\u001f\u0010\u000b\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00032\n\b\u0002\u0010\u0004\u001a\u0004\u0018\u00010\u0003HÆ\u0001J\u0013\u0010\f\u001a\u00020\r2\b\u0010\u000e\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\u000f\u001a\u00020\u0010HÖ\u0001J\t\u0010\u0011\u001a\u00020\u0003HÖ\u0001R\u0013\u0010\u0004\u001a\u0004\u0018\u00010\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0006\u0010\u0007R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\b\u0010\u0007¨\u0006\u0012"}, | |
d2 = {"Lwhatever/Test;", "", "name", "", "lastName", "(Ljava/lang/String;Ljava/lang/String;)V", "getLastName", "()Ljava/lang/String;", "getName", "component1", "component2", "copy", "equals", "", "other", "hashCode", "", "toString", "kotlin-gradle-library.main"} | |
) | |
public final class Test { | |
@NotNull | |
private final String name; | |
@Nullable | |
private final String lastName; | |
@NotNull | |
public final String getName() { | |
return this.name; | |
} | |
@Nullable | |
public final String getLastName() { | |
return this.lastName; | |
} | |
public Test(@NotNull String name, @Nullable String lastName) { | |
Intrinsics.checkNotNullParameter(name, "name"); | |
super(); | |
this.name = name; | |
this.lastName = lastName; | |
} | |
@NotNull | |
public final String component1() { | |
return this.name; | |
} | |
@Nullable | |
public final String component2() { | |
return this.lastName; | |
} | |
@NotNull | |
public final Test copy(@NotNull String name, @Nullable String lastName) { | |
Intrinsics.checkNotNullParameter(name, "name"); | |
return new Test(name, lastName); | |
} | |
// $FF: synthetic method | |
public static Test copy$default(Test var0, String var1, String var2, int var3, Object var4) { | |
if ((var3 & 1) != 0) { | |
var1 = var0.name; | |
} | |
if ((var3 & 2) != 0) { | |
var2 = var0.lastName; | |
} | |
return var0.copy(var1, var2); | |
} | |
@NotNull | |
public String toString() { | |
return "Test(name=" + this.name + ", lastName=" + this.lastName + ")"; | |
} | |
public int hashCode() { | |
String var10000 = this.name; | |
int var1 = (var10000 != null ? var10000.hashCode() : 0) * 31; | |
String var10001 = this.lastName; | |
return var1 + (var10001 != null ? var10001.hashCode() : 0); | |
} | |
public boolean equals(@Nullable Object var1) { | |
if (this != var1) { | |
if (var1 instanceof Test) { | |
Test var2 = (Test)var1; | |
if (Intrinsics.areEqual(this.name, var2.name) && Intrinsics.areEqual(this.lastName, var2.lastName)) { | |
return true; | |
} | |
} | |
return false; | |
} else { | |
return true; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment