Guest User

working

a guest
Aug 16th, 2022
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 5.26 KB | None | 0 0
  1. // Test.java
  2. import java.util.Iterator;
  3. import kotlin.Metadata;
  4. import kotlin.jvm.internal.DefaultConstructorMarker;
  5. import kotlin.jvm.internal.Intrinsics;
  6. import org.jetbrains.annotations.NotNull;
  7. import org.jetbrains.annotations.Nullable;
  8.  
  9. @Metadata(
  10.    mv = {1, 1, 13},
  11.    bv = {1, 0, 3},
  12.    k = 1,
  13.    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"},
  14.    d2 = {"LTest;", "", "key", "", "(Ljava/lang/String;)V", "getKey", "()Ljava/lang/String;", "Companion", "First", "Second", "LTest$First;", "LTest$Second;"}
  15. )
  16. public abstract class Test {
  17.    @NotNull
  18.    private final String key;
  19.    public static final Test.Companion Companion = new Test.Companion((DefaultConstructorMarker)null);
  20.  
  21.    @NotNull
  22.    public final String getKey() {
  23.       return this.key;
  24.    }
  25.  
  26.    private Test(String key) {
  27.       this.key = key;
  28.    }
  29.  
  30.    // $FF: synthetic method
  31.    public Test(String key, DefaultConstructorMarker $constructor_marker) {
  32.       this(key);
  33.    }
  34.  
  35.    @Metadata(
  36.       mv = {1, 1, 13},
  37.       bv = {1, 0, 3},
  38.       k = 1,
  39.       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"},
  40.       d2 = {"LTest$First;", "LTest;", "()V"}
  41.    )
  42.    public static final class First extends Test {
  43.       public static final Test.First INSTANCE;
  44.  
  45.       private First() {
  46.          super("First", (DefaultConstructorMarker)null);
  47.       }
  48.  
  49.       static {
  50.          Test.First var0 = new Test.First();
  51.          INSTANCE = var0;
  52.       }
  53.    }
  54.  
  55.    @Metadata(
  56.       mv = {1, 1, 13},
  57.       bv = {1, 0, 3},
  58.       k = 1,
  59.       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"},
  60.       d2 = {"LTest$Second;", "LTest;", "()V"}
  61.    )
  62.    public static final class Second extends Test {
  63.       public static final Test.Second INSTANCE;
  64.  
  65.       private Second() {
  66.          super("Second", (DefaultConstructorMarker)null);
  67.       }
  68.  
  69.       static {
  70.          Test.Second var0 = new Test.Second();
  71.          INSTANCE = var0;
  72.       }
  73.    }
  74.  
  75.    @Metadata(
  76.       mv = {1, 1, 13},
  77.       bv = {1, 0, 3},
  78.       k = 1,
  79.       d1 = {"\u0000\u0016\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0010\u0010\u0003\u001a\u0004\u0018\u00010\u00042\u0006\u0010\u0005\u001a\u00020\u0006¨\u0006\u0004"},
  80.       d2 = {"LTest$Companion;", "", "()V", "findFromKey", "LTest;", "key", ""}
  81.    )
  82.    public static final class Companion {
  83.       @Nullable
  84.       public final Test findFromKey(@NotNull String key) {
  85.          Intrinsics.checkParameterIsNotNull(key, "key");
  86.          Iterable $receiver$iv = (Iterable)MainKt.getFirstAndSecond();
  87.          Iterator var3 = $receiver$iv.iterator();
  88.  
  89.          Object var10000;
  90.          while(true) {
  91.             if (var3.hasNext()) {
  92.                Object element$iv = var3.next();
  93.                Test it = (Test)element$iv;
  94.                int var6 = false;
  95.                if (!Intrinsics.areEqual(it.getKey(), key)) {
  96.                   continue;
  97.                }
  98.  
  99.                var10000 = element$iv;
  100.                break;
  101.             }
  102.  
  103.             var10000 = null;
  104.             break;
  105.          }
  106.  
  107.          return (Test)var10000;
  108.       }
  109.  
  110.       private Companion() {
  111.       }
  112.  
  113.       // $FF: synthetic method
  114.       public Companion(DefaultConstructorMarker $constructor_marker) {
  115.          this();
  116.       }
  117.    }
  118. }
  119. // MainKt.java
  120. import java.util.List;
  121. import kotlin.Metadata;
  122. import kotlin.collections.CollectionsKt;
  123. import kotlin.jvm.internal.Intrinsics;
  124. import org.jetbrains.annotations.NotNull;
  125.  
  126. @Metadata(
  127.    mv = {1, 1, 13},
  128.    bv = {1, 0, 3},
  129.    k = 2,
  130.    d1 = {"\u0000\u0012\n\u0000\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u0002\u001a\u0006\u0010\u0005\u001a\u00020\u0006\"\u0017\u0010\u0000\u001a\b\u0012\u0004\u0012\u00020\u00020\u0001¢\u0006\b\n\u0000\u001a\u0004\b\u0003\u0010\u0004¨\u0006\u0002"},
  131.    d2 = {"firstAndSecond", "", "LTest;", "getFirstAndSecond", "()Ljava/util/List;", "main", ""}
  132. )
  133. public final class MainKt {
  134.    @NotNull
  135.    private static final List firstAndSecond;
  136.  
  137.    public static final void main() {
  138.       Test.First instance = Test.First.INSTANCE;
  139.       Test found = Test.Companion.findFromKey(instance.getKey());
  140.       if (found == null) {
  141.          Intrinsics.throwNpe();
  142.       }
  143.  
  144.       String var2 = String.valueOf(found.getKey());
  145.       System.out.println(var2);
  146.    }
  147.  
  148.    // $FF: synthetic method
  149.    public static void main(String[] var0) {
  150.       main();
  151.    }
  152.  
  153.    @NotNull
  154.    public static final List getFirstAndSecond() {
  155.       return firstAndSecond;
  156.    }
  157.  
  158.    static {
  159.       firstAndSecond = CollectionsKt.listOf(new Test[]{(Test)Test.First.INSTANCE, (Test)Test.Second.INSTANCE});
  160.    }
  161. }
  162.  
Add Comment
Please, Sign In to add comment