@Test public void typeElementUtils() throws Exception { Throwable expectedException = null; try { Constructor<TypeElementUtils> constructor = TypeElementUtils.class.getDeclaredConstructor(); Assert.assertFalse(constructor.isAccessible()); constructor.setAccessible(true); constructor.newInstance(); } catch (InvocationTargetException exception) { expectedException = exception.getCause(); } Assert.assertTrue(expectedException instanceof AssertionError); }
private TypeElementUtils() { throw new AssertionError("Instantiating utility class."); }
TypeElementUtils { private TypeElementUtils() { throw new AssertionError("Instantiating utility class."); } }
TypeElementUtils { private TypeElementUtils() { throw new AssertionError("Instantiating utility class."); } private  TypeElementUtils(); }
TypeElementUtils { private TypeElementUtils() { throw new AssertionError("Instantiating utility class."); } private  TypeElementUtils(); static boolean isAbstract(@NonNull TypeElement element); static ImmutableList<ExecutableElement> getConstructors(@NonNull TypeElement element); static ImmutableList<ExecutableElement> getConstructorsWithAnnotation(
      List<ExecutableElement> constructors, Class<? extends Annotation> annotation); static String packageNameOf(final TypeElement type); static String simpleNameOf(String s); }
TypeElementUtils { private TypeElementUtils() { throw new AssertionError("Instantiating utility class."); } private  TypeElementUtils(); static boolean isAbstract(@NonNull TypeElement element); static ImmutableList<ExecutableElement> getConstructors(@NonNull TypeElement element); static ImmutableList<ExecutableElement> getConstructorsWithAnnotation(
      List<ExecutableElement> constructors, Class<? extends Annotation> annotation); static String packageNameOf(final TypeElement type); static String simpleNameOf(String s);  }