public static String getViewTypeByReflect(View view) {
        Class<?> compatClass;
        String viewType = SnapCache.getInstance().getCanonicalName(view.getClass());
        compatClass = ReflectUtil.getClassByName("android.widget.Switch");
        if (compatClass != null && compatClass.isInstance(view)) {
            return getViewType(viewType, "Switch");
        }
        compatClass = ReflectUtil.getClassByName("android.support.v7.widget.SwitchCompat");
        if (compatClass != null && compatClass.isInstance(view)) {
            return getViewType(viewType, "SwitchCompat");
        }
        compatClass = ReflectUtil.getClassByName("androidx.appcompat.widget.SwitchCompat");
        if (compatClass != null && compatClass.isInstance(view)) {
            return getViewType(viewType, "SwitchCompat");
        }
        return viewType;
    }
@Test
    public void getViewTypeByReflect() {
        TextView textView1 = new TextView(mApplication);
        textView1.setText("child1");
        Assert.assertEquals("android.widget.TextView",
                SAViewUtils.getViewTypeByReflect(textView1));
    }