@Test public void 指定したJava型にマッチするLiteralConvertorを返却する() { assertThat(registory.getConverter(String.class), is(instanceOf(StringLiteralConvertor.class))); assertThat(registory.getConverter(java.sql.Date.class), is(instanceOf(SqlDateLiteralConvertor.class))); assertThat(registory.getConverter(java.sql.Time.class), is(instanceOf(TimeLiteralConvertor.class))); assertThat(registory.getConverter(java.sql.Timestamp.class), is(instanceOf(TimestampLiteralConvertor.class))); assertThat(registory.getConverter(Date.class), is(instanceOf(DateLiteralConvertor.class))); assertThat(registory.getConverter(null), is(instanceOf(DefaultLiteralConvertor.class))); }
@SuppressWarnings("rawtypes") public LiteralConvertor getConverter(Class<?> type) { if (hasConvertor(type)) { return registory.get(type); } else { return registory.get(null); } }
LiteralConvertorRegistory { @SuppressWarnings("rawtypes") public LiteralConvertor getConverter(Class<?> type) { if (hasConvertor(type)) { return registory.get(type); } else { return registory.get(null); } } }
LiteralConvertorRegistory { @SuppressWarnings("rawtypes") public LiteralConvertor getConverter(Class<?> type) { if (hasConvertor(type)) { return registory.get(type); } else { return registory.get(null); } } private  LiteralConvertorRegistory(); }
LiteralConvertorRegistory { @SuppressWarnings("rawtypes") public LiteralConvertor getConverter(Class<?> type) { if (hasConvertor(type)) { return registory.get(type); } else { return registory.get(null); } } private  LiteralConvertorRegistory(); static LiteralConvertorRegistory getInstance(); @SuppressWarnings("rawtypes") void regist(List<LiteralConvertor> convertors); @SuppressWarnings("rawtypes") void regist(LiteralConvertor convertor); boolean hasConvertor(Class<?> type); @SuppressWarnings("rawtypes") LiteralConvertor getConverter(Class<?> type); }
LiteralConvertorRegistory { @SuppressWarnings("rawtypes") public LiteralConvertor getConverter(Class<?> type) { if (hasConvertor(type)) { return registory.get(type); } else { return registory.get(null); } } private  LiteralConvertorRegistory(); static LiteralConvertorRegistory getInstance(); @SuppressWarnings("rawtypes") void regist(List<LiteralConvertor> convertors); @SuppressWarnings("rawtypes") void regist(LiteralConvertor convertor); boolean hasConvertor(Class<?> type); @SuppressWarnings("rawtypes") LiteralConvertor getConverter(Class<?> type);  }