@Test public void testNoParsers(@TuneProvider Tune tune) { FieldSpec.Builder builder = FieldSpec.builder(String.class, "test"); FieldModel model = mock(FieldModel.class); when(model.getInclusion()).thenReturn(InclusionType.NON_NULL); new InclusionRule(tune, null).process(builder, model); FieldSpec spec = builder.build(); assertEquals("test", spec.name, "Wrong name found."); assertEquals(0, spec.annotations.size(), "Annotations found."); }
@Override public void process(FieldSpec.Builder fieldSpec, FieldModel fieldModel) { if (fieldModel.getInclusion() == null) { return; } tune.getAnnotatorStyles().forEach(style -> style.processInclusionRule(fieldSpec, fieldModel)); }
InclusionRule extends FieldRule { @Override public void process(FieldSpec.Builder fieldSpec, FieldModel fieldModel) { if (fieldModel.getInclusion() == null) { return; } tune.getAnnotatorStyles().forEach(style -> style.processInclusionRule(fieldSpec, fieldModel)); } }
InclusionRule extends FieldRule { @Override public void process(FieldSpec.Builder fieldSpec, FieldModel fieldModel) { if (fieldModel.getInclusion() == null) { return; } tune.getAnnotatorStyles().forEach(style -> style.processInclusionRule(fieldSpec, fieldModel)); } InclusionRule(Tune tune, MetaInfo metaInfo); }
InclusionRule extends FieldRule { @Override public void process(FieldSpec.Builder fieldSpec, FieldModel fieldModel) { if (fieldModel.getInclusion() == null) { return; } tune.getAnnotatorStyles().forEach(style -> style.processInclusionRule(fieldSpec, fieldModel)); } InclusionRule(Tune tune, MetaInfo metaInfo); @Override void process(FieldSpec.Builder fieldSpec, FieldModel fieldModel); }
InclusionRule extends FieldRule { @Override public void process(FieldSpec.Builder fieldSpec, FieldModel fieldModel) { if (fieldModel.getInclusion() == null) { return; } tune.getAnnotatorStyles().forEach(style -> style.processInclusionRule(fieldSpec, fieldModel)); } InclusionRule(Tune tune, MetaInfo metaInfo); @Override void process(FieldSpec.Builder fieldSpec, FieldModel fieldModel);  }