// 
// Decompiled by Procyon v0.6.0
// 

package com.hypixel.hytale.server.core.modules.prefabspawner;

import com.hypixel.hytale.protocol.packets.interface_.Page;
import com.hypixel.hytale.server.core.entity.entities.Player;
import com.hypixel.hytale.server.core.ui.builder.EventData;
import com.hypixel.hytale.protocol.packets.interface_.CustomUIEventBindingType;
import java.util.Objects;
import com.hypixel.hytale.component.Store;
import com.hypixel.hytale.server.core.ui.builder.UIEventBuilder;
import com.hypixel.hytale.server.core.ui.builder.UICommandBuilder;
import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
import com.hypixel.hytale.component.Ref;
import com.hypixel.hytale.protocol.packets.interface_.CustomPageLifetime;
import com.hypixel.hytale.server.core.universe.PlayerRef;
import com.hypixel.hytale.server.core.entity.entities.player.pages.InteractiveCustomUIPage;
import com.hypixel.hytale.codec.builder.BuilderCodec;
import javax.annotation.Nullable;
import javax.annotation.Nonnull;
import com.hypixel.hytale.codec.Codec;
import com.hypixel.hytale.server.core.prefab.PrefabWeights;
import com.hypixel.hytale.codec.KeyedCodec;
import com.hypixel.hytale.server.core.universe.world.meta.BlockState;

public class PrefabSpawnerState extends BlockState
{
    public static final String PREFAB_SPAWNER_TYPE = "prefabspawner";
    public static final KeyedCodec<Boolean> FIT_HEIGHTMAP_CODEC;
    public static final KeyedCodec<Boolean> INHERIT_SEED_CODEC;
    public static final KeyedCodec<Boolean> INHERIT_HEIGHT_CONDITION_CODEC;
    public static final KeyedCodec<PrefabWeights> PREFAB_WEIGHTS_CODEC;
    @Nonnull
    public static final Codec<PrefabSpawnerState> CODEC;
    private String prefabPath;
    private boolean fitHeightmap;
    private boolean inheritSeed;
    private boolean inheritHeightCondition;
    private PrefabWeights prefabWeights;
    
    public PrefabSpawnerState() {
        this.fitHeightmap = false;
        this.inheritSeed = true;
        this.inheritHeightCondition = true;
        this.prefabWeights = PrefabWeights.NONE;
    }
    
    public String getPrefabPath() {
        return this.prefabPath;
    }
    
    public void setPrefabPath(final String prefabPath) {
        this.prefabPath = prefabPath;
    }
    
    public boolean isFitHeightmap() {
        return this.fitHeightmap;
    }
    
    public void setFitHeightmap(final boolean fitHeightmap) {
        this.fitHeightmap = fitHeightmap;
    }
    
    public boolean isInheritSeed() {
        return this.inheritSeed;
    }
    
    public void setInheritSeed(final boolean inheritSeed) {
        this.inheritSeed = inheritSeed;
    }
    
    public boolean isInheritHeightCondition() {
        return this.inheritHeightCondition;
    }
    
    public void setInheritHeightCondition(final boolean inheritHeightCondition) {
        this.inheritHeightCondition = inheritHeightCondition;
    }
    
    public PrefabWeights getPrefabWeights() {
        return this.prefabWeights;
    }
    
    public void setPrefabWeights(final PrefabWeights prefabWeights) {
        this.prefabWeights = prefabWeights;
    }
    
    @Nullable
    private PrefabWeights getPrefabWeightsNullable() {
        if (this.prefabWeights.size() == 0) {
            return null;
        }
        return this.prefabWeights;
    }
    
    static {
        FIT_HEIGHTMAP_CODEC = new KeyedCodec<Boolean>("FitHeightmap", Codec.BOOLEAN);
        INHERIT_SEED_CODEC = new KeyedCodec<Boolean>("InheritSeed", Codec.BOOLEAN);
        INHERIT_HEIGHT_CONDITION_CODEC = new KeyedCodec<Boolean>("InheritHeightCondition", Codec.BOOLEAN);
        PREFAB_WEIGHTS_CODEC = new KeyedCodec<PrefabWeights>("PrefabWeights", PrefabWeights.CODEC);
        CODEC = BuilderCodec.builder(PrefabSpawnerState.class, PrefabSpawnerState::new, BlockState.BASE_CODEC).append(new KeyedCodec<String>("PrefabPath", Codec.STRING), (state, s) -> state.prefabPath = s, state -> state.prefabPath).documentation("The prefab path where the prefab is located. This uses the dot-notation. 'folder.folder.folder.filename'").add().append(PrefabSpawnerState.FIT_HEIGHTMAP_CODEC, (state, s) -> state.fitHeightmap = s, state -> state.fitHeightmap).documentation("Determines if the child prefab should follow the heightmap during generation in worldgen.").add().append(PrefabSpawnerState.INHERIT_SEED_CODEC, (state, s) -> state.inheritSeed = s, state -> state.inheritSeed).documentation("Determines if the child prefab should inherit the worldgen-id from the parent. This allows child prefabs to have independent markers.").add().append(PrefabSpawnerState.INHERIT_HEIGHT_CONDITION_CODEC, (state, s) -> state.inheritHeightCondition = s, state -> state.inheritHeightCondition).documentation("Determines if the child prefab should inherit the HeightCondition from the parent. Setting to false allows child prefabs to bypass the height condition check.").add().append(PrefabSpawnerState.PREFAB_WEIGHTS_CODEC, PrefabSpawnerState::setPrefabWeights, PrefabSpawnerState::getPrefabWeightsNullable).documentation("Determines the probability of each individual prefab file being selected to generate when the PrefabPath points to a folder containing multiple prefabs.").add().build();
    }
    
    public static class PrefabSpawnerSettingsPage extends InteractiveCustomUIPage<PrefabSpawnerSettingsPageEventData>
    {
        private final PrefabSpawnerState state;
        
        public PrefabSpawnerSettingsPage(@Nonnull final PlayerRef playerRef, final PrefabSpawnerState state, @Nonnull final CustomPageLifetime lifetime) {
            super(playerRef, lifetime, PrefabSpawnerSettingsPageEventData.CODEC);
            this.state = state;
        }
        
        @Override
        public void build(@Nonnull final Ref<EntityStore> ref, @Nonnull final UICommandBuilder commandBuilder, @Nonnull final UIEventBuilder eventBuilder, @Nonnull final Store<EntityStore> store) {
            commandBuilder.append("Pages/PrefabSpawnerSettingsPage.ui");
            commandBuilder.set("#PrefabPath.Value", Objects.requireNonNullElse(this.state.prefabPath, ""));
            commandBuilder.set("#FitHeightmap #CheckBox.Value", this.state.fitHeightmap);
            commandBuilder.set("#InheritSeed #CheckBox.Value", this.state.inheritSeed);
            commandBuilder.set("#InheritHeightCondition #CheckBox.Value", this.state.inheritHeightCondition);
            commandBuilder.set("#DefaultWeight.Value", this.state.getPrefabWeights().getDefaultWeight());
            commandBuilder.set("#PrefabWeights.Value", this.state.getPrefabWeights().getMappingString());
            eventBuilder.addEventBinding(CustomUIEventBindingType.Activating, "#SaveButton", new EventData().append("@PrefabPath", "#PrefabPath.Value").append("@FitHeightmap", "#FitHeightmap #CheckBox.Value").append("@InheritSeed", "#InheritSeed #CheckBox.Value").append("@InheritHeightCondition", "#InheritHeightCondition #CheckBox.Value").append("@DefaultWeight", "#DefaultWeight.Value").append("@PrefabWeights", "#PrefabWeights.Value"));
        }
        
        @Override
        public void handleDataEvent(@Nonnull final Ref<EntityStore> ref, @Nonnull final Store<EntityStore> store, @Nonnull final PrefabSpawnerSettingsPageEventData data) {
            this.state.prefabPath = data.prefabPath;
            this.state.fitHeightmap = data.fitHeightmap;
            this.state.inheritSeed = data.inheritSeed;
            this.state.inheritHeightCondition = data.inheritHeightCondition;
            (this.state.prefabWeights = PrefabWeights.parse(data.prefabWeights)).setDefaultWeight(data.defaultWeight);
            this.state.markNeedsSave();
            final Player playerComponent = store.getComponent(ref, Player.getComponentType());
            playerComponent.getPageManager().setPage(ref, store, Page.None);
        }
    }
    
    public static class PrefabSpawnerSettingsPageEventData
    {
        public static final String KEY_PREFAB_PATH = "@PrefabPath";
        public static final String KEY_FIT_HEIGHTMAP = "@FitHeightmap";
        public static final String KEY_INHERIT_SEED = "@InheritSeed";
        public static final String KEY_INHERIT_HEIGHT_CONDITION = "@InheritHeightCondition";
        public static final String KEY_DEFAULT_WEIGHT = "@DefaultWeight";
        public static final String KEY_PREFAB_WEIGHTS = "@PrefabWeights";
        public static final BuilderCodec<PrefabSpawnerSettingsPageEventData> CODEC;
        private String prefabPath;
        private boolean fitHeightmap;
        private boolean inheritSeed;
        private boolean inheritHeightCondition;
        private double defaultWeight;
        private String prefabWeights;
        
        static {
            // 
            // This method could not be decompiled.
            // 
            // Original Bytecode:
            // 
            //     2: invokedynamic   BootstrapMethod #0, get:()Ljava/util/function/Supplier;
            //     7: invokestatic    com/hypixel/hytale/codec/builder/BuilderCodec.builder:(Ljava/lang/Class;Ljava/util/function/Supplier;)Lcom/hypixel/hytale/codec/builder/BuilderCodec$Builder;
            //    10: new             Lcom/hypixel/hytale/codec/KeyedCodec;
            //    13: dup            
            //    14: ldc             "@PrefabPath"
            //    16: getstatic       com/hypixel/hytale/codec/Codec.STRING:Lcom/hypixel/hytale/codec/codecs/simple/StringCodec;
            //    19: invokespecial   com/hypixel/hytale/codec/KeyedCodec.<init>:(Ljava/lang/String;Lcom/hypixel/hytale/codec/Codec;)V
            //    22: invokedynamic   BootstrapMethod #1, accept:()Ljava/util/function/BiConsumer;
            //    27: invokedynamic   BootstrapMethod #2, apply:()Ljava/util/function/Function;
            //    32: invokevirtual   com/hypixel/hytale/codec/builder/BuilderCodec$Builder.append:(Lcom/hypixel/hytale/codec/KeyedCodec;Ljava/util/function/BiConsumer;Ljava/util/function/Function;)Lcom/hypixel/hytale/codec/builder/BuilderField$FieldBuilder;
            //    35: invokevirtual   com/hypixel/hytale/codec/builder/BuilderField$FieldBuilder.add:()Lcom/hypixel/hytale/codec/builder/BuilderCodec$BuilderBase;
            //    38: checkcast       Lcom/hypixel/hytale/codec/builder/BuilderCodec$Builder;
            //    41: new             Lcom/hypixel/hytale/codec/KeyedCodec;
            //    44: dup            
            //    45: ldc             "@FitHeightmap"
            //    47: getstatic       com/hypixel/hytale/codec/Codec.BOOLEAN:Lcom/hypixel/hytale/codec/codecs/simple/BooleanCodec;
            //    50: invokespecial   com/hypixel/hytale/codec/KeyedCodec.<init>:(Ljava/lang/String;Lcom/hypixel/hytale/codec/Codec;)V
            //    53: invokedynamic   BootstrapMethod #3, accept:()Ljava/util/function/BiConsumer;
            //    58: invokedynamic   BootstrapMethod #4, apply:()Ljava/util/function/Function;
            //    63: invokevirtual   com/hypixel/hytale/codec/builder/BuilderCodec$Builder.append:(Lcom/hypixel/hytale/codec/KeyedCodec;Ljava/util/function/BiConsumer;Ljava/util/function/Function;)Lcom/hypixel/hytale/codec/builder/BuilderField$FieldBuilder;
            //    66: invokevirtual   com/hypixel/hytale/codec/builder/BuilderField$FieldBuilder.add:()Lcom/hypixel/hytale/codec/builder/BuilderCodec$BuilderBase;
            //    69: checkcast       Lcom/hypixel/hytale/codec/builder/BuilderCodec$Builder;
            //    72: new             Lcom/hypixel/hytale/codec/KeyedCodec;
            //    75: dup            
            //    76: ldc             "@InheritSeed"
            //    78: getstatic       com/hypixel/hytale/codec/Codec.BOOLEAN:Lcom/hypixel/hytale/codec/codecs/simple/BooleanCodec;
            //    81: invokespecial   com/hypixel/hytale/codec/KeyedCodec.<init>:(Ljava/lang/String;Lcom/hypixel/hytale/codec/Codec;)V
            //    84: invokedynamic   BootstrapMethod #5, accept:()Ljava/util/function/BiConsumer;
            //    89: invokedynamic   BootstrapMethod #6, apply:()Ljava/util/function/Function;
            //    94: invokevirtual   com/hypixel/hytale/codec/builder/BuilderCodec$Builder.append:(Lcom/hypixel/hytale/codec/KeyedCodec;Ljava/util/function/BiConsumer;Ljava/util/function/Function;)Lcom/hypixel/hytale/codec/builder/BuilderField$FieldBuilder;
            //    97: invokevirtual   com/hypixel/hytale/codec/builder/BuilderField$FieldBuilder.add:()Lcom/hypixel/hytale/codec/builder/BuilderCodec$BuilderBase;
            //   100: checkcast       Lcom/hypixel/hytale/codec/builder/BuilderCodec$Builder;
            //   103: new             Lcom/hypixel/hytale/codec/KeyedCodec;
            //   106: dup            
            //   107: ldc             "@InheritHeightCondition"
            //   109: getstatic       com/hypixel/hytale/codec/Codec.BOOLEAN:Lcom/hypixel/hytale/codec/codecs/simple/BooleanCodec;
            //   112: invokespecial   com/hypixel/hytale/codec/KeyedCodec.<init>:(Ljava/lang/String;Lcom/hypixel/hytale/codec/Codec;)V
            //   115: invokedynamic   BootstrapMethod #7, accept:()Ljava/util/function/BiConsumer;
            //   120: invokedynamic   BootstrapMethod #8, apply:()Ljava/util/function/Function;
            //   125: invokevirtual   com/hypixel/hytale/codec/builder/BuilderCodec$Builder.append:(Lcom/hypixel/hytale/codec/KeyedCodec;Ljava/util/function/BiConsumer;Ljava/util/function/Function;)Lcom/hypixel/hytale/codec/builder/BuilderField$FieldBuilder;
            //   128: invokevirtual   com/hypixel/hytale/codec/builder/BuilderField$FieldBuilder.add:()Lcom/hypixel/hytale/codec/builder/BuilderCodec$BuilderBase;
            //   131: checkcast       Lcom/hypixel/hytale/codec/builder/BuilderCodec$Builder;
            //   134: new             Lcom/hypixel/hytale/codec/KeyedCodec;
            //   137: dup            
            //   138: ldc             "@DefaultWeight"
            //   140: getstatic       com/hypixel/hytale/codec/Codec.DOUBLE:Lcom/hypixel/hytale/codec/codecs/simple/DoubleCodec;
            //   143: invokespecial   com/hypixel/hytale/codec/KeyedCodec.<init>:(Ljava/lang/String;Lcom/hypixel/hytale/codec/Codec;)V
            //   146: invokedynamic   BootstrapMethod #9, accept:()Ljava/util/function/BiConsumer;
            //   151: invokedynamic   BootstrapMethod #10, apply:()Ljava/util/function/Function;
            //   156: invokevirtual   com/hypixel/hytale/codec/builder/BuilderCodec$Builder.append:(Lcom/hypixel/hytale/codec/KeyedCodec;Ljava/util/function/BiConsumer;Ljava/util/function/Function;)Lcom/hypixel/hytale/codec/builder/BuilderField$FieldBuilder;
            //   159: dconst_0       
            //   160: invokestatic    java/lang/Double.valueOf:(D)Ljava/lang/Double;
            //   163: invokestatic    com/hypixel/hytale/codec/validation/Validators.greaterThanOrEqual:(Ljava/lang/Comparable;)Lcom/hypixel/hytale/codec/validation/Validator;
            //   166: invokevirtual   com/hypixel/hytale/codec/builder/BuilderField$FieldBuilder.addValidator:(Lcom/hypixel/hytale/codec/validation/Validator;)Lcom/hypixel/hytale/codec/builder/BuilderField$FieldBuilder;
            //   169: invokevirtual   com/hypixel/hytale/codec/builder/BuilderField$FieldBuilder.add:()Lcom/hypixel/hytale/codec/builder/BuilderCodec$BuilderBase;
            //   172: checkcast       Lcom/hypixel/hytale/codec/builder/BuilderCodec$Builder;
            //   175: new             Lcom/hypixel/hytale/codec/KeyedCodec;
            //   178: dup            
            //   179: ldc             "@PrefabWeights"
            //   181: getstatic       com/hypixel/hytale/codec/Codec.STRING:Lcom/hypixel/hytale/codec/codecs/simple/StringCodec;
            //   184: invokespecial   com/hypixel/hytale/codec/KeyedCodec.<init>:(Ljava/lang/String;Lcom/hypixel/hytale/codec/Codec;)V
            //   187: invokedynamic   BootstrapMethod #11, accept:()Ljava/util/function/BiConsumer;
            //   192: invokedynamic   BootstrapMethod #12, apply:()Ljava/util/function/Function;
            //   197: invokevirtual   com/hypixel/hytale/codec/builder/BuilderCodec$Builder.append:(Lcom/hypixel/hytale/codec/KeyedCodec;Ljava/util/function/BiConsumer;Ljava/util/function/Function;)Lcom/hypixel/hytale/codec/builder/BuilderField$FieldBuilder;
            //   200: invokevirtual   com/hypixel/hytale/codec/builder/BuilderField$FieldBuilder.add:()Lcom/hypixel/hytale/codec/builder/BuilderCodec$BuilderBase;
            //   203: checkcast       Lcom/hypixel/hytale/codec/builder/BuilderCodec$Builder;
            //   206: invokevirtual   com/hypixel/hytale/codec/builder/BuilderCodec$Builder.build:()Lcom/hypixel/hytale/codec/builder/BuilderCodec;
            //   209: putstatic       com/hypixel/hytale/server/core/modules/prefabspawner/PrefabSpawnerState$PrefabSpawnerSettingsPageEventData.CODEC:Lcom/hypixel/hytale/codec/builder/BuilderCodec;
            //   212: return         
            // 
            // The error that occurred was:
            // 
            // java.lang.UnsupportedOperationException: The requested operation is not supported.
            //     at com.strobel.util.ContractUtils.unsupported(ContractUtils.java:27)
            //     at com.strobel.assembler.metadata.TypeReference.getRawType(TypeReference.java:284)
            //     at com.strobel.assembler.metadata.TypeReference.getRawType(TypeReference.java:279)
            //     at com.strobel.assembler.metadata.TypeReference.makeGenericType(TypeReference.java:154)
            //     at com.strobel.assembler.metadata.TypeSubstitutionVisitor.visitParameterizedType(TypeSubstitutionVisitor.java:225)
            //     at com.strobel.assembler.metadata.TypeSubstitutionVisitor.visitParameterizedType(TypeSubstitutionVisitor.java:25)
            //     at com.strobel.assembler.metadata.ParameterizedType.accept(ParameterizedType.java:103)
            //     at com.strobel.assembler.metadata.TypeSubstitutionVisitor.visit(TypeSubstitutionVisitor.java:40)
            //     at com.strobel.assembler.metadata.TypeSubstitutionVisitor.visitParameterizedType(TypeSubstitutionVisitor.java:211)
            //     at com.strobel.assembler.metadata.TypeSubstitutionVisitor.visitParameterizedType(TypeSubstitutionVisitor.java:25)
            //     at com.strobel.assembler.metadata.ParameterizedType.accept(ParameterizedType.java:103)
            //     at com.strobel.assembler.metadata.TypeSubstitutionVisitor.visit(TypeSubstitutionVisitor.java:40)
            //     at com.strobel.assembler.metadata.TypeSubstitutionVisitor.visitMethod(TypeSubstitutionVisitor.java:314)
            //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2611)
            //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
            //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
            //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:790)
            //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2689)
            //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
            //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
            //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:790)
            //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2689)
            //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
            //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
            //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
            //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
            //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1510)
            //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
            //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:790)
            //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2689)
            //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
            //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
            //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:790)
            //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2689)
            //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
            //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
            //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
            //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
            //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1510)
            //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
            //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:790)
            //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2689)
            //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
            //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
            //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
            //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
            //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1083)
            //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
            //     at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:684)
            //     at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:667)
            //     at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:373)
            //     at com.strobel.decompiler.ast.TypeAnalysis.run(TypeAnalysis.java:95)
            //     at com.strobel.decompiler.ast.AstOptimizer.optimize(AstOptimizer.java:344)
            //     at com.strobel.decompiler.ast.AstOptimizer.optimize(AstOptimizer.java:42)
            //     at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:206)
            //     at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:93)
            //     at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:868)
            //     at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:761)
            //     at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:638)
            //     at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:605)
            //     at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:195)
            //     at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:662)
            //     at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:605)
            //     at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:195)
            //     at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:162)
            //     at com.strobel.decompiler.languages.java.ast.AstBuilder.addType(AstBuilder.java:137)
            //     at com.strobel.decompiler.languages.java.JavaLanguage.buildAst(JavaLanguage.java:71)
            //     at com.strobel.decompiler.languages.java.JavaLanguage.decompileType(JavaLanguage.java:59)
            //     at com.strobel.decompiler.DecompilerDriver.decompileType(DecompilerDriver.java:333)
            //     at com.strobel.decompiler.DecompilerDriver.decompileJar(DecompilerDriver.java:254)
            //     at com.strobel.decompiler.DecompilerDriver.main(DecompilerDriver.java:129)
            // 
            throw new IllegalStateException("An error occurred while decompiling this method.");
        }
    }
}
