@Test public void canHandle() throws Exception { assertTrue(converter.canHandle("2017-09-03", TypeToken.of(LocalTime.class))); assertTrue(converter.canHandle("2017-09-03", TypeToken.of(LocalDate.class))); assertTrue(converter.canHandle("2017-09-03", TypeToken.of(LocalDateTime.class))); assertFalse(converter.canHandle("2017-09-03", TypeToken.of(Duration.class))); assertFalse(converter.canHandle(new Date(), TypeToken.of(LocalDate.class))); }
@Override public boolean canHandle(Object source, TypeToken<?> targetTypeToken) { return targetTypeToken.isSubtypeOf(BaseLocal.class) && stringToDateConverter.canHandle(source, TypeToken.of(Date.class)); }
StringToJodaTimeBaseLocalConverter extends AbstractConverter { @Override public boolean canHandle(Object source, TypeToken<?> targetTypeToken) { return targetTypeToken.isSubtypeOf(BaseLocal.class) && stringToDateConverter.canHandle(source, TypeToken.of(Date.class)); } }
StringToJodaTimeBaseLocalConverter extends AbstractConverter { @Override public boolean canHandle(Object source, TypeToken<?> targetTypeToken) { return targetTypeToken.isSubtypeOf(BaseLocal.class) && stringToDateConverter.canHandle(source, TypeToken.of(Date.class)); }  }
StringToJodaTimeBaseLocalConverter extends AbstractConverter { @Override public boolean canHandle(Object source, TypeToken<?> targetTypeToken) { return targetTypeToken.isSubtypeOf(BaseLocal.class) && stringToDateConverter.canHandle(source, TypeToken.of(Date.class)); }  @Override Object convert(Object source, TypeToken<?> targetTypeToken); @Override boolean canHandle(Object source, TypeToken<?> targetTypeToken); }
StringToJodaTimeBaseLocalConverter extends AbstractConverter { @Override public boolean canHandle(Object source, TypeToken<?> targetTypeToken) { return targetTypeToken.isSubtypeOf(BaseLocal.class) && stringToDateConverter.canHandle(source, TypeToken.of(Date.class)); }  @Override Object convert(Object source, TypeToken<?> targetTypeToken); @Override boolean canHandle(Object source, TypeToken<?> targetTypeToken);  }