@Test public void applyShouldAddGeneratedAnnotation() throws Exception { final TypeSpec.Builder builder = TypeSpec.classBuilder("Test"); underTest.apply(builder); assertThat(builder.build()) .hasName("Test") .hasAnnotation(AnnotationSpec.builder(Generated.class) .addMember("value", "$S", this.getClass().getCanonicalName()) .build()); }
@Override public void apply(@Nonnull TypeSpec.Builder builder) { builder.addAnnotation(AnnotationSpec.builder(Generated.class) .addMember("value", "$S", klass.getCanonicalName()) .build()); }
GeneratedAnnotationPolicy implements AnnotationPolicy { @Override public void apply(@Nonnull TypeSpec.Builder builder) { builder.addAnnotation(AnnotationSpec.builder(Generated.class) .addMember("value", "$S", klass.getCanonicalName()) .build()); } }
GeneratedAnnotationPolicy implements AnnotationPolicy { @Override public void apply(@Nonnull TypeSpec.Builder builder) { builder.addAnnotation(AnnotationSpec.builder(Generated.class) .addMember("value", "$S", klass.getCanonicalName()) .build()); } GeneratedAnnotationPolicy(@Nonnull Class<?> klass); }
GeneratedAnnotationPolicy implements AnnotationPolicy { @Override public void apply(@Nonnull TypeSpec.Builder builder) { builder.addAnnotation(AnnotationSpec.builder(Generated.class) .addMember("value", "$S", klass.getCanonicalName()) .build()); } GeneratedAnnotationPolicy(@Nonnull Class<?> klass); @Override void apply(@Nonnull TypeSpec.Builder builder); }
GeneratedAnnotationPolicy implements AnnotationPolicy { @Override public void apply(@Nonnull TypeSpec.Builder builder) { builder.addAnnotation(AnnotationSpec.builder(Generated.class) .addMember("value", "$S", klass.getCanonicalName()) .build()); } GeneratedAnnotationPolicy(@Nonnull Class<?> klass); @Override void apply(@Nonnull TypeSpec.Builder builder);  }