content: package kotlin.jvm.internal;
  
  import java.io.ObjectStreamException;
  import java.io.Serializable;
  import java.lang.annotation.Annotation;
  import java.util.List;
  import java.util.Map;
  import kotlin.jvm.KotlinReflectionNotSupportedError;
  import kotlin.reflect.KCallable;
  import kotlin.reflect.KDeclarationContainer;
  import kotlin.reflect.KParameter;
  import kotlin.reflect.KType;
  import kotlin.reflect.KTypeParameter;
  import kotlin.reflect.KVisibility;
  
  public abstract class CallableReference implements KCallable, Serializable {
      public static final Object NO_RECEIVER = NoReceiver.INSTANCE;
      private final boolean isTopLevel;
      private final String name;
      private final Class owner;
      protected final Object receiver;
      private transient KCallable reflected;
      private final String signature;
  
      private static class NoReceiver implements Serializable {
          /* access modifiers changed from: private */
          public static final NoReceiver INSTANCE = new NoReceiver();
  
          private NoReceiver() {
          }
  
          private Object readResolve() throws ObjectStreamException {
              return INSTANCE;
          }
      }
  
      public CallableReference() {
          this(NO_RECEIVER);
      }
  
      protected CallableReference(Object receiver2) {
          this(receiver2, (Class) null, (String) null, (String) null, false);
      }
  
      protected CallableReference(Object receiver2, Class owner2, String name2, String signature2, boolean isTopLevel2) {
          this.receiver = receiver2;
          this.owner = owner2;
          this.name = name2;
          this.signature = signature2;
          this.isTopLevel = isTopLevel2;
      }
  
      public Object call(Object... args) {
          return getReflected().call(args);
      }
  
      public Object callBy(Map args) {
          return getReflected().callBy(args);
      }
  
      public KCallable compute() {
          KCallable kCallable = this.reflected;
          if (kCallable != null) {
              return kCallable;
          }
          KCallable computeReflected = computeReflected();
          this.reflected = computeReflected;
          return computeReflected;
      }
  
      /* access modifiers changed from: protected */
      public abstract KCallable computeReflected();
  
      public List<Annotation> getAnnotations() {
          return getReflected().getAnnotations();
      }
  
      public Object getBoundReceiver() {
          return this.receiver;
      }
  
      public String getName() {
          return this.name;
      }
  
      public KDeclarationContainer getOwner() {
          Class cls = this.owner;
          if (cls == null) {
              return null;
          }
          return this.isTopLevel ? Reflection.getOrCreateKotlinPackage(cls) : Reflection.getOrCreateKotlinClass(cls);
      }
  
      public List<KParameter> getParameters() {
          return getReflected().getParameters();
      }
  
      /* access modifiers changed from: protected */
      public KCallable getReflected() {
          KCallable compute = compute();
          if (compute != this) {
              return compute;
          }
          throw new KotlinReflectionNotSupportedError();
      }
  
      public KType getReturnType() {
          return getReflected().getReturnType();
      }
  
      public String getSignature() {
          return this.signature;
      }
  
      public List<KTypeParameter> getTypeParameters() {
          return getReflected().getTypeParameters();
      }
  
      public KVisibility getVisibility() {
          return getReflected().getVisibility();
      }
  
      public boolean isAbstract() {
          return getReflected().isAbstract();
      }
  
      public boolean isFinal() {
          return getReflected().isFinal();
      }
  
      public boolean isOpen() {
          return getReflected().isOpen();
      }
  
      public boolean isSuspend() {
          return getReflected().isSuspend();
      }
  }
  