code: public boolean checkInstanceOf(Context context, CharSequence targetClassName,
              CharSequence loaderPackage, CharSequence referenceClassName) {
          if ((targetClassName == null) || (referenceClassName == null)) {
              return false;
          }
  
          // Try a shortcut for efficiency.
          if (TextUtils.equals(targetClassName, referenceClassName)) {
              return true;
          }
  
          final Class<?> referenceClass = loadOrGetCachedClass(
                  context, referenceClassName, loaderPackage);
          if (referenceClass == null) {
              return false;
          }
  
          return checkInstanceOf(context, targetClassName, loaderPackage, referenceClass);
      }
docs: Returns whether a target class is an instance of a reference class.
  <p>
  If a class cannot be loaded by the default {@link ClassLoader}, this
  method will attempt to use the loader for the specified app package.
  </p>