content: package androidx.core.app;
  
  import android.app.Activity;
  import android.app.Application;
  import android.app.Service;
  import android.content.BroadcastReceiver;
  import android.content.ContentProvider;
  import android.content.Intent;
  import java.lang.reflect.InvocationTargetException;
  
  public class AppComponentFactory extends android.app.AppComponentFactory {
      public final Activity instantiateActivity(ClassLoader cl, String className, Intent intent) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
          return (Activity) CoreComponentFactory.checkCompatWrapper(instantiateActivityCompat(cl, className, intent));
      }
  
      public Activity instantiateActivityCompat(ClassLoader cl, String className, Intent intent) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
          try {
              return (Activity) Class.forName(className, false, cl).asSubclass(Activity.class).getDeclaredConstructor(new Class[0]).newInstance(new Object[0]);
          } catch (NoSuchMethodException | InvocationTargetException e) {
              throw new RuntimeException("Couldn't call constructor", e);
          }
      }
  
      public final Application instantiateApplication(ClassLoader cl, String className) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
          return (Application) CoreComponentFactory.checkCompatWrapper(instantiateApplicationCompat(cl, className));
      }
  
      public Application instantiateApplicationCompat(ClassLoader cl, String className) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
          try {
              return (Application) Class.forName(className, false, cl).asSubclass(Application.class).getDeclaredConstructor(new Class[0]).newInstance(new Object[0]);
          } catch (NoSuchMethodException | InvocationTargetException e) {
              throw new RuntimeException("Couldn't call constructor", e);
          }
      }
  
      public final ContentProvider instantiateProvider(ClassLoader cl, String className) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
          return (ContentProvider) CoreComponentFactory.checkCompatWrapper(instantiateProviderCompat(cl, className));
      }
  
      public ContentProvider instantiateProviderCompat(ClassLoader cl, String className) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
          try {
              return (ContentProvider) Class.forName(className, false, cl).asSubclass(ContentProvider.class).getDeclaredConstructor(new Class[0]).newInstance(new Object[0]);
          } catch (NoSuchMethodException | InvocationTargetException e) {
              throw new RuntimeException("Couldn't call constructor", e);
          }
      }
  
      public final BroadcastReceiver instantiateReceiver(ClassLoader cl, String className, Intent intent) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
          return (BroadcastReceiver) CoreComponentFactory.checkCompatWrapper(instantiateReceiverCompat(cl, className, intent));
      }
  
      public BroadcastReceiver instantiateReceiverCompat(ClassLoader cl, String className, Intent intent) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
          try {
              return (BroadcastReceiver) Class.forName(className, false, cl).asSubclass(BroadcastReceiver.class).getDeclaredConstructor(new Class[0]).newInstance(new Object[0]);
          } catch (NoSuchMethodException | InvocationTargetException e) {
              throw new RuntimeException("Couldn't call constructor", e);
          }
      }
  
      public final Service instantiateService(ClassLoader cl, String className, Intent intent) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
          return (Service) CoreComponentFactory.checkCompatWrapper(instantiateServiceCompat(cl, className, intent));
      }
  
      public Service instantiateServiceCompat(ClassLoader cl, String className, Intent intent) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
          try {
              return (Service) Class.forName(className, false, cl).asSubclass(Service.class).getDeclaredConstructor(new Class[0]).newInstance(new Object[0]);
          } catch (NoSuchMethodException | InvocationTargetException e) {
              throw new RuntimeException("Couldn't call constructor", e);
          }
      }
  }
  