@Test public void applyShouldAddGeneratedAnnotation() throws Exception { final TypeSpec.Builder builder = TypeSpec.classBuilder("Test"); underTest.apply(builder); assertThat(builder.build()) .hasName("Test") .hasAnnotation(AnnotationSpec.builder(SuppressWarnings.class) .addMember("value", "$S", "all") .build()); }
@Override public void apply(@Nonnull TypeSpec.Builder builder) { builder.addAnnotation(AnnotationSpec.builder(SuppressWarnings.class) .addMember("value", "$S", value) .build()); }
SuppressWarningsAnnotationPolicy implements AnnotationPolicy { @Override public void apply(@Nonnull TypeSpec.Builder builder) { builder.addAnnotation(AnnotationSpec.builder(SuppressWarnings.class) .addMember("value", "$S", value) .build()); } }
SuppressWarningsAnnotationPolicy implements AnnotationPolicy { @Override public void apply(@Nonnull TypeSpec.Builder builder) { builder.addAnnotation(AnnotationSpec.builder(SuppressWarnings.class) .addMember("value", "$S", value) .build()); } SuppressWarningsAnnotationPolicy(@Nonnull String value); }
SuppressWarningsAnnotationPolicy implements AnnotationPolicy { @Override public void apply(@Nonnull TypeSpec.Builder builder) { builder.addAnnotation(AnnotationSpec.builder(SuppressWarnings.class) .addMember("value", "$S", value) .build()); } SuppressWarningsAnnotationPolicy(@Nonnull String value); @Override void apply(@Nonnull TypeSpec.Builder builder); }
SuppressWarningsAnnotationPolicy implements AnnotationPolicy { @Override public void apply(@Nonnull TypeSpec.Builder builder) { builder.addAnnotation(AnnotationSpec.builder(SuppressWarnings.class) .addMember("value", "$S", value) .build()); } SuppressWarningsAnnotationPolicy(@Nonnull String value); @Override void apply(@Nonnull TypeSpec.Builder builder);  }