@Test public void testNoInclusion(@TuneProvider(JACKSON) Tune tune) { TypeSpec.Builder builder = TypeSpec.classBuilder("Test"); TypeModel model = mock(TypeModel.class); new GlobalInclusionRule(tune, null).process(builder, model); TypeSpec spec = builder.build(); assertEquals("Test", spec.name, "Wrong name found."); assertEquals(0, spec.annotations.size(), "Annotation not found."); }
@Override public void process(TypeSpec.Builder typeSpec, TypeModel typeModel) { if (typeModel.getInclusion() == null) { return; } tune.getAnnotatorStyles().forEach(style -> style.processGlobalInclusionRule(typeSpec, typeModel)); }
GlobalInclusionRule extends TypeRule { @Override public void process(TypeSpec.Builder typeSpec, TypeModel typeModel) { if (typeModel.getInclusion() == null) { return; } tune.getAnnotatorStyles().forEach(style -> style.processGlobalInclusionRule(typeSpec, typeModel)); } }
GlobalInclusionRule extends TypeRule { @Override public void process(TypeSpec.Builder typeSpec, TypeModel typeModel) { if (typeModel.getInclusion() == null) { return; } tune.getAnnotatorStyles().forEach(style -> style.processGlobalInclusionRule(typeSpec, typeModel)); } GlobalInclusionRule(Tune tune, MetaInfo metaInfo); }
GlobalInclusionRule extends TypeRule { @Override public void process(TypeSpec.Builder typeSpec, TypeModel typeModel) { if (typeModel.getInclusion() == null) { return; } tune.getAnnotatorStyles().forEach(style -> style.processGlobalInclusionRule(typeSpec, typeModel)); } GlobalInclusionRule(Tune tune, MetaInfo metaInfo); @Override void process(TypeSpec.Builder typeSpec, TypeModel typeModel); }
GlobalInclusionRule extends TypeRule { @Override public void process(TypeSpec.Builder typeSpec, TypeModel typeModel) { if (typeModel.getInclusion() == null) { return; } tune.getAnnotatorStyles().forEach(style -> style.processGlobalInclusionRule(typeSpec, typeModel)); } GlobalInclusionRule(Tune tune, MetaInfo metaInfo); @Override void process(TypeSpec.Builder typeSpec, TypeModel typeModel);  }