@Test void shouldEvaluateIfInstantiable() { assertThat(InjectorUtils.canInstantiate(Iterable.class), equalTo(false)); assertThat(InjectorUtils.canInstantiate(SampleEnum.class), equalTo(false)); assertThat(InjectorUtils.canInstantiate(TypeSafeAnnotationHandler.class), equalTo(false)); assertThat(InjectorUtils.canInstantiate(Object[].class), equalTo(false)); assertThat(InjectorUtils.canInstantiate(InjectorUtils.class), equalTo(true)); }
public static boolean canInstantiate(Class<?> clazz) { return !clazz.isEnum() && !clazz.isInterface() && !clazz.isArray() && !Modifier.isAbstract(clazz.getModifiers()); }
InjectorUtils { public static boolean canInstantiate(Class<?> clazz) { return !clazz.isEnum() && !clazz.isInterface() && !clazz.isArray() && !Modifier.isAbstract(clazz.getModifiers()); } }
InjectorUtils { public static boolean canInstantiate(Class<?> clazz) { return !clazz.isEnum() && !clazz.isInterface() && !clazz.isArray() && !Modifier.isAbstract(clazz.getModifiers()); } private  InjectorUtils(); }
InjectorUtils { public static boolean canInstantiate(Class<?> clazz) { return !clazz.isEnum() && !clazz.isInterface() && !clazz.isArray() && !Modifier.isAbstract(clazz.getModifiers()); } private  InjectorUtils(); static void checkNotNull(Object o); static void checkNotNull(Object o, String errorMessage); @SafeVarargs static void checkNoNullValues(T... arr); static boolean containsNullValue(Object... arr); static void checkArgument(boolean expression, String errorMessage); static void rethrowException(Exception e); @Nullable static T firstNotNull(T obj1, T obj2); static boolean canInstantiate(Class<?> clazz); }
InjectorUtils { public static boolean canInstantiate(Class<?> clazz) { return !clazz.isEnum() && !clazz.isInterface() && !clazz.isArray() && !Modifier.isAbstract(clazz.getModifiers()); } private  InjectorUtils(); static void checkNotNull(Object o); static void checkNotNull(Object o, String errorMessage); @SafeVarargs static void checkNoNullValues(T... arr); static boolean containsNullValue(Object... arr); static void checkArgument(boolean expression, String errorMessage); static void rethrowException(Exception e); @Nullable static T firstNotNull(T obj1, T obj2); static boolean canInstantiate(Class<?> clazz);  }