ReflectionUtils { public static boolean isComponent(Class<?> componentClass) { if (componentClass != null) { return Component.class.isAssignableFrom(componentClass); } else { return false; } } private  ReflectionUtils(); static List<Method> findMethods(Class<?> clazz, String nameRegex,
            ParamCount numberOfParams); static List<Method> findMethods(Class<?> clazz, String nameRegex,
            Class<?>... paramTypes); static boolean isComponent(Class<?> componentClass); static List<Field> getAllDeclaredFields(Class<?> type); static List<Field> getAllDeclaredFieldsAnnotatedWith(Class<?> type,
            Class<? extends Annotation> annotationType); static List<Method> getAllDeclaredMethods(Class<?> type); static List<Method> getAllDeclaredMethodsAnnotatedWith(Class<?> type,
            Class<? extends Annotation> annotationType);  }
@Test public void test_isComponent() { assertTrue(isComponent(Button.class)); assertFalse(isComponent(SubClassToExamine.class)); assertFalse(isComponent(null)); }