public boolean shouldAcquire(String name) {
    // the org.robolectric.res package lives in the base classloader, but not its tests; yuck.
    int lastDot = name.lastIndexOf('.');
    String pkgName = name.substring(0, lastDot == -1 ? 0 : lastDot);
    if (pkgName.equals("org.robolectric.res")) {
      return name.contains("Test");
    }
    if (name.matches("com\\.android\\.internal\\.R(\\$.*)?")) return true;
    // Android SDK code almost universally refers to com.android.internal.R, except
    // when refering to android.R.stylable, as in HorizontalScrollView. arghgh.
    // See https://github.com/robolectric/robolectric/issues/521
    if (name.equals("android.R$styleable")) return true;
    return !(
        name.matches(".*\\.R(|\\$[a-z]+)$")
            || CLASSES_TO_ALWAYS_DELEGATE.contains(name)
            || name.startsWith("java.")
            || name.startsWith("javax.")
            || name.startsWith("sun.")
            || name.startsWith("com.sun.")
            || name.startsWith("org.w3c.")
            || name.startsWith("org.xml.")
            || name.startsWith("org.junit")
            || name.startsWith("org.hamcrest")
            || name.startsWith("org.specs2")  // allows for android projects with mixed scala\java tests to be
            || name.startsWith("scala.")      //  run with Maven Surefire (see the RoboSpecs project on github)
            || name.startsWith("org.sqlite.") // ugh, we're barfing while loading org.sqlite now for some reason?!? todo: still?
    );
  }
public boolean shouldAcquire(String name) {
   
    int lastDot = name.lastIndexOf('.');
    String pkgName = name.substring(0, lastDot == -1 ? 0 : lastDot);
    if (pkgName.equals("org.robolectric.res")) {
      return name.contains("Test");
    }
    if (name.matches("com\\.android\\.internal\\.R(\\$.*)?")) return true;
   
   
   
    if (name.equals("android.R$styleable")) return true;
    return !(
        name.matches(".*\\.R(|\\$[a-z]+)$")
            || CLASSES_TO_ALWAYS_DELEGATE.contains(name)
            || name.startsWith("java.")
            || name.startsWith("javax.")
            || name.startsWith("sun.")
            || name.startsWith("com.sun.")
            || name.startsWith("org.w3c.")
            || name.startsWith("org.xml.")
            || name.startsWith("org.junit")
            || name.startsWith("org.hamcrest")
            || name.startsWith("org.specs2") 
            || name.startsWith("scala.")     
            || name.startsWith("org.sqlite.")
    );
  }
public boolean shouldacquire(string name) { int lastdot = name.lastindexof('.'); string pkgname = name.substring(0, lastdot == -1 ? 0 : lastdot); if (pkgname.equals("org.robolectric.res")) { return name.contains("test"); } if (name.matches("com\\.android\\.internal\\.r(\\$.*)?")) return true; if (name.equals("android.r$styleable")) return true; return !( name.matches(".*\\.r(|\\$[a-z]+)$") || classes_to_always_delegate.contains(name) || name.startswith("java.") || name.startswith("javax.") || name.startswith("sun.") || name.startswith("com.sun.") || name.startswith("org.w3c.") || name.startswith("org.xml.") || name.startswith("org.junit") || name.startswith("org.hamcrest") || name.startswith("org.specs2") || name.startswith("scala.") || name.startswith("org.sqlite.") ); }