Code example for ComponentName

Methods: getClassName, getPackageName

0
      throw new NameNotFoundException(); 
    } 
  } 
 
  @Override public ActivityInfo getActivityInfo(ComponentName className, int flags) throws NameNotFoundException {
    String packageName = className.getPackageName();
    AndroidManifest androidManifest = androidManifests.get(packageName);
    String activityName = className.getClassName();
    ActivityData activityData = androidManifest.getActivityData(activityName);
    ActivityInfo activityInfo = new ActivityInfo();
    activityInfo.packageName = packageName;
    activityInfo.name = activityName;
    if (activityData != null) {
      ResourceIndex resourceIndex = Robolectric.getShadowApplication().getResourceLoader().getResourceIndex();
      activityInfo.theme = resourceIndex.getResourceId(new ResName(activityData.getThemeRef()));
    } 
    activityInfo.applicationInfo = getApplicationInfo(packageName, flags);
    return activityInfo;
  } 
 
  @Override