@Test public void testRequiredRule() { FieldSpec.Builder builder = FieldSpec.builder(String.class, "test"); FieldModel model = mock(FieldModel.class); new Jsr305Style().processRequiredRule(builder, model); FieldSpec fieldSpec = builder.build(); assertEquals("test", fieldSpec.name); assertEquals(1, fieldSpec.annotations.size()); }
@Override public void processRequiredRule(FieldSpec.Builder fieldSpec, FieldModel fieldModel) { fieldSpec.addAnnotation(JSR_305_NON_NULL); }
Jsr305Style extends ValidationAnnotatorStyle { @Override public void processRequiredRule(FieldSpec.Builder fieldSpec, FieldModel fieldModel) { fieldSpec.addAnnotation(JSR_305_NON_NULL); } }
Jsr305Style extends ValidationAnnotatorStyle { @Override public void processRequiredRule(FieldSpec.Builder fieldSpec, FieldModel fieldModel) { fieldSpec.addAnnotation(JSR_305_NON_NULL); }  }
Jsr305Style extends ValidationAnnotatorStyle { @Override public void processRequiredRule(FieldSpec.Builder fieldSpec, FieldModel fieldModel) { fieldSpec.addAnnotation(JSR_305_NON_NULL); }  @Override void processRequiredRule(FieldSpec.Builder fieldSpec, FieldModel fieldModel); @Override void processRequiredRuleForGetters(MethodSpec.Builder methodSpec, FieldModel fieldModel); @Override void processRequiredRuleForSetters(MethodSpec.Builder methodSpec, FieldModel fieldModel, ParameterSpec.Builder parameterSpec); @Override void processNotRequiredRule(FieldSpec.Builder fieldSpec, FieldModel fieldModel); @Override void processNotRequiredRuleForGetters(MethodSpec.Builder methodSpec, FieldModel fieldModel); @Override void processNotRequiredRuleForSetters(MethodSpec.Builder methodSpec, FieldModel fieldModel, ParameterSpec.Builder parameterSpec); @Override void processRequiredRuleForConstructor(ParameterSpec.Builder parameterSpec); @Override void processNotRequiredRuleForConstructor(ParameterSpec.Builder parameterSpec); }
Jsr305Style extends ValidationAnnotatorStyle { @Override public void processRequiredRule(FieldSpec.Builder fieldSpec, FieldModel fieldModel) { fieldSpec.addAnnotation(JSR_305_NON_NULL); }  @Override void processRequiredRule(FieldSpec.Builder fieldSpec, FieldModel fieldModel); @Override void processRequiredRuleForGetters(MethodSpec.Builder methodSpec, FieldModel fieldModel); @Override void processRequiredRuleForSetters(MethodSpec.Builder methodSpec, FieldModel fieldModel, ParameterSpec.Builder parameterSpec); @Override void processNotRequiredRule(FieldSpec.Builder fieldSpec, FieldModel fieldModel); @Override void processNotRequiredRuleForGetters(MethodSpec.Builder methodSpec, FieldModel fieldModel); @Override void processNotRequiredRuleForSetters(MethodSpec.Builder methodSpec, FieldModel fieldModel, ParameterSpec.Builder parameterSpec); @Override void processRequiredRuleForConstructor(ParameterSpec.Builder parameterSpec); @Override void processNotRequiredRuleForConstructor(ParameterSpec.Builder parameterSpec);  }