package com.l7tech.gateway.common.spring.factory.config;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.concurrent.atomic.AtomicReference;
import org.springframework.context.ApplicationContext;

final class a<T> implements InvocationHandler {
   private final ApplicationContext a;
   private final String b;
   private final Class<? extends T> c;
   private final boolean d;
   private final AtomicReference<T> e = new AtomicReference<>();
   static final boolean f = !LazyProxyFactoryBean.class.desiredAssertionStatus();

   private a(ApplicationContext var1, String var2, Class<? extends T> var3, boolean var4) {
      this.a = var1;
      this.b = var2;
      this.c = var3;
      this.d = var4;
   }

   @Override
   public Object invoke(Object param1, Method param2, Object[] param3) throws Throwable {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 00: aload 0
      // 01: getfield com/l7tech/gateway/common/spring/factory/config/a.e Ljava/util/concurrent/atomic/AtomicReference;
      // 04: invokevirtual java/util/concurrent/atomic/AtomicReference.get ()Ljava/lang/Object;
      // 07: astore 4
      // 09: aload 4
      // 0b: ifnonnull 65
      // 0e: getstatic com/l7tech/gateway/common/spring/factory/config/a.f Z
      // 11: ifne 49
      // 14: goto 1b
      // 17: invokestatic com/l7tech/gateway/common/spring/factory/config/a.a (Ljava/lang/reflect/InvocationTargetException;)Ljava/lang/reflect/InvocationTargetException;
      // 1a: athrow
      // 1b: aload 0
      // 1c: getfield com/l7tech/gateway/common/spring/factory/config/a.d Z
      // 1f: ifne 49
      // 22: goto 29
      // 25: invokestatic com/l7tech/gateway/common/spring/factory/config/a.a (Ljava/lang/reflect/InvocationTargetException;)Ljava/lang/reflect/InvocationTargetException;
      // 28: athrow
      // 29: aload 0
      // 2a: getfield com/l7tech/gateway/common/spring/factory/config/a.a Lorg/springframework/context/ApplicationContext;
      // 2d: checkcast org/springframework/context/support/AbstractApplicationContext
      // 30: invokevirtual org/springframework/context/support/AbstractApplicationContext.isRunning ()Z
      // 33: ifne 49
      // 36: goto 3d
      // 39: invokestatic com/l7tech/gateway/common/spring/factory/config/a.a (Ljava/lang/reflect/InvocationTargetException;)Ljava/lang/reflect/InvocationTargetException;
      // 3c: athrow
      // 3d: new java/lang/AssertionError
      // 40: dup
      // 41: invokespecial java/lang/AssertionError.<init> ()V
      // 44: athrow
      // 45: invokestatic com/l7tech/gateway/common/spring/factory/config/a.a (Ljava/lang/reflect/InvocationTargetException;)Ljava/lang/reflect/InvocationTargetException;
      // 48: athrow
      // 49: aload 0
      // 4a: getfield com/l7tech/gateway/common/spring/factory/config/a.a Lorg/springframework/context/ApplicationContext;
      // 4d: aload 0
      // 4e: getfield com/l7tech/gateway/common/spring/factory/config/a.b Ljava/lang/String;
      // 51: aload 0
      // 52: getfield com/l7tech/gateway/common/spring/factory/config/a.c Ljava/lang/Class;
      // 55: invokeinterface org/springframework/context/ApplicationContext.getBean (Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object; 3
      // 5a: astore 4
      // 5c: aload 0
      // 5d: getfield com/l7tech/gateway/common/spring/factory/config/a.e Ljava/util/concurrent/atomic/AtomicReference;
      // 60: aload 4
      // 62: invokevirtual java/util/concurrent/atomic/AtomicReference.set (Ljava/lang/Object;)V
      // 65: aload 2
      // 66: aload 4
      // 68: aload 3
      // 69: invokevirtual java/lang/reflect/Method.invoke (Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
      // 6c: areturn
      // 6d: astore 5
      // 6f: aload 5
      // 71: invokevirtual java/lang/reflect/InvocationTargetException.getCause ()Ljava/lang/Throwable;
      // 74: athrow
      // try (17 -> 29): 29 java/lang/reflect/InvocationTargetException
      // try (11 -> 22): 23 java/lang/reflect/InvocationTargetException
      // try (6 -> 14): 15 java/lang/reflect/InvocationTargetException
      // try (4 -> 8): 9 java/lang/reflect/InvocationTargetException
      // try (43 -> 47): 48 java/lang/reflect/InvocationTargetException
   }

   private static InvocationTargetException a(InvocationTargetException var0) {
      return var0;
   }
}
