Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Test.java
- import java.util.Iterator;
- import java.util.List;
- import kotlin.Metadata;
- import kotlin.collections.CollectionsKt;
- import kotlin.jvm.internal.DefaultConstructorMarker;
- import kotlin.jvm.internal.Intrinsics;
- import org.jetbrains.annotations.NotNull;
- import org.jetbrains.annotations.Nullable;
- @Metadata(
- mv = {1, 1, 13},
- bv = {1, 0, 3},
- k = 1,
- d1 = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\b6\u0018\u0000 \u00072\u00020\u0001:\u0003\u0007\b\tB\u000f\b\u0002\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0005\u0010\u0006\u0082\u0001\u0002\n\u000b¨\u0006\u0000"},
- d2 = {"LTest;", "", "key", "", "(Ljava/lang/String;)V", "getKey", "()Ljava/lang/String;", "Companion", "First", "Second", "LTest$First;", "LTest$Second;"}
- )
- public abstract class Test {
- @NotNull
- private final String key;
- @NotNull
- private static final List firstAndSecond;
- public static final Test.Companion Companion = new Test.Companion((DefaultConstructorMarker)null);
- @NotNull
- public final String getKey() {
- return this.key;
- }
- private Test(String key) {
- this.key = key;
- }
- static {
- firstAndSecond = CollectionsKt.listOf(new Test[]{(Test)Test.First.INSTANCE, (Test)Test.Second.INSTANCE});
- }
- // $FF: synthetic method
- public Test(String key, DefaultConstructorMarker $constructor_marker) {
- this(key);
- }
- @Metadata(
- mv = {1, 1, 13},
- bv = {1, 0, 3},
- k = 1,
- d1 = {"\u0000\n\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\bÆ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002¨\u0006\u0001"},
- d2 = {"LTest$First;", "LTest;", "()V"}
- )
- public static final class First extends Test {
- public static final Test.First INSTANCE;
- private First() {
- super("First", (DefaultConstructorMarker)null);
- }
- static {
- Test.First var0 = new Test.First();
- INSTANCE = var0;
- }
- }
- @Metadata(
- mv = {1, 1, 13},
- bv = {1, 0, 3},
- k = 1,
- d1 = {"\u0000\n\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\bÆ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002¨\u0006\u0001"},
- d2 = {"LTest$Second;", "LTest;", "()V"}
- )
- public static final class Second extends Test {
- public static final Test.Second INSTANCE;
- private Second() {
- super("Second", (DefaultConstructorMarker)null);
- }
- static {
- Test.Second var0 = new Test.Second();
- INSTANCE = var0;
- }
- }
- @Metadata(
- mv = {1, 1, 13},
- bv = {1, 0, 3},
- k = 1,
- d1 = {"\u0000\u001c\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u000e\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0010\u0010\b\u001a\u0004\u0018\u00010\u00052\u0006\u0010\t\u001a\u00020\nR\u0017\u0010\u0003\u001a\b\u0012\u0004\u0012\u00020\u00050\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0006\u0010\u0007¨\u0006\u0005"},
- d2 = {"LTest$Companion;", "", "()V", "firstAndSecond", "", "LTest;", "getFirstAndSecond", "()Ljava/util/List;", "findFromKey", "key", ""}
- )
- public static final class Companion {
- @NotNull
- public final List getFirstAndSecond() {
- return Test.firstAndSecond;
- }
- @Nullable
- public final Test findFromKey(@NotNull String key) {
- Intrinsics.checkParameterIsNotNull(key, "key");
- Iterable $receiver$iv = (Iterable)((Test.Companion)this).getFirstAndSecond();
- Iterator var3 = $receiver$iv.iterator();
- Object var10000;
- while(true) {
- if (var3.hasNext()) {
- Object element$iv = var3.next();
- Test it = (Test)element$iv;
- int var6 = false;
- if (!Intrinsics.areEqual(it.getKey(), key)) {
- continue;
- }
- var10000 = element$iv;
- break;
- }
- var10000 = null;
- break;
- }
- return (Test)var10000;
- }
- private Companion() {
- }
- // $FF: synthetic method
- public Companion(DefaultConstructorMarker $constructor_marker) {
- this();
- }
- }
- }
- // MainKt.java
- import kotlin.Metadata;
- import kotlin.jvm.internal.Intrinsics;
- @Metadata(
- mv = {1, 1, 13},
- bv = {1, 0, 3},
- k = 2,
- d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0002\n\u0000\u001a\u0006\u0010\u0000\u001a\u00020\u0001¨\u0006\u0002"},
- d2 = {"main", "", "Test"}
- )
- public final class MainKt {
- public static final void main() {
- Test.First instance = Test.First.INSTANCE;
- Test found = Test.Companion.findFromKey(instance.getKey());
- if (found == null) {
- Intrinsics.throwNpe();
- }
- String var2 = String.valueOf(found.getKey());
- System.out.println(var2);
- }
- // $FF: synthetic method
- public static void main(String[] var0) {
- main();
- }
- }
Add Comment
Please, Sign In to add comment