code: public static boolean nodeMatchesClassByName(
              Context context, AccessibilityNodeInfoCompat node, CharSequence referenceClassName) {
          if ((node == null) || (referenceClassName == null)) {
              return false;
          }
  
          // Attempt to take a shortcut.
          final CharSequence nodeClassName = node.getClassName();
          if (TextUtils.equals(nodeClassName, referenceClassName)) {
              return true;
          }
  
          final ClassLoadingManager loader = ClassLoadingManager.getInstance();
          final CharSequence appPackage = node.getPackageName();
          return loader.checkInstanceOf(context, nodeClassName, appPackage, referenceClassName);
      }
docs: Determines if the class of an {@link AccessibilityNodeInfoCompat} matches
  a given {@link Class} by package and name.
  
  @param node A sealed {@link AccessibilityNodeInfoCompat} dispatched by
  the accessibility framework.
  @param referenceClassName A class name to match.
  @return {@code true} if the {@link AccessibilityNodeInfoCompat} matches
  the class name.