@Test public void Date型のプロパティエディタが検索できる() { registry = new ExtendedServletRequestDataBinder(new TestBean()); registrar = new JseDefaultDatePropertyEditorRegistrar(); registrar.registerCustomEditors(registry); PropertyEditor editor = registry.findCustomEditor(Date.class, "birth"); assertThat(editor, is(notNullValue())); assertThat(editor.getClass().getName(), is(DateEditor.class.getName())); }
@Override public void registerCustomEditors(PropertyEditorRegistry registry) { registry.registerCustomEditor(Date.class, new DateEditor(allowEmpty, true, pattern, message)); }
JseDefaultDatePropertyEditorRegistrar implements PropertyEditorRegistrar { @Override public void registerCustomEditors(PropertyEditorRegistry registry) { registry.registerCustomEditor(Date.class, new DateEditor(allowEmpty, true, pattern, message)); } }
JseDefaultDatePropertyEditorRegistrar implements PropertyEditorRegistrar { @Override public void registerCustomEditors(PropertyEditorRegistry registry) { registry.registerCustomEditor(Date.class, new DateEditor(allowEmpty, true, pattern, message)); } JseDefaultDatePropertyEditorRegistrar(); }
JseDefaultDatePropertyEditorRegistrar implements PropertyEditorRegistrar { @Override public void registerCustomEditors(PropertyEditorRegistry registry) { registry.registerCustomEditor(Date.class, new DateEditor(allowEmpty, true, pattern, message)); } JseDefaultDatePropertyEditorRegistrar(); @Override void registerCustomEditors(PropertyEditorRegistry registry); String getPattern(); void setPattern(String pattern); boolean isAllowEmpty(); void setAllowEmpty(boolean allowEmpty); String getMessage(); void setMessage(String message); }
JseDefaultDatePropertyEditorRegistrar implements PropertyEditorRegistrar { @Override public void registerCustomEditors(PropertyEditorRegistry registry) { registry.registerCustomEditor(Date.class, new DateEditor(allowEmpty, true, pattern, message)); } JseDefaultDatePropertyEditorRegistrar(); @Override void registerCustomEditors(PropertyEditorRegistry registry); String getPattern(); void setPattern(String pattern); boolean isAllowEmpty(); void setAllowEmpty(boolean allowEmpty); String getMessage(); void setMessage(String message);  }