@Test(expected = VRaptorException.class) public void complainsIfNoConverterFound() { converters.to(DefaultConvertersTest.class); }
public <T> Converter<T> to(Class<T> clazz) { if (!existsFor(clazz)) { throw new VRaptorException("Unable to find converter for " + clazz.getName()); } return (Converter<T>) container.instanceFor(findConverterType(clazz)); }
DefaultConverters implements Converters { public <T> Converter<T> to(Class<T> clazz) { if (!existsFor(clazz)) { throw new VRaptorException("Unable to find converter for " + clazz.getName()); } return (Converter<T>) container.instanceFor(findConverterType(clazz)); } }
DefaultConverters implements Converters { public <T> Converter<T> to(Class<T> clazz) { if (!existsFor(clazz)) { throw new VRaptorException("Unable to find converter for " + clazz.getName()); } return (Converter<T>) container.instanceFor(findConverterType(clazz)); } DefaultConverters(Container container); }
DefaultConverters implements Converters { public <T> Converter<T> to(Class<T> clazz) { if (!existsFor(clazz)) { throw new VRaptorException("Unable to find converter for " + clazz.getName()); } return (Converter<T>) container.instanceFor(findConverterType(clazz)); } DefaultConverters(Container container); void register(Class<? extends Converter<?>> converterClass); Converter<T> to(Class<T> clazz); boolean existsFor(Class<?> type); boolean existsTwoWayFor(Class<?> type); TwoWayConverter<?> twoWayConverterFor(Class<?> type); }
DefaultConverters implements Converters { public <T> Converter<T> to(Class<T> clazz) { if (!existsFor(clazz)) { throw new VRaptorException("Unable to find converter for " + clazz.getName()); } return (Converter<T>) container.instanceFor(findConverterType(clazz)); } DefaultConverters(Container container); void register(Class<? extends Converter<?>> converterClass); Converter<T> to(Class<T> clazz); boolean existsFor(Class<?> type); boolean existsTwoWayFor(Class<?> type); TwoWayConverter<?> twoWayConverterFor(Class<?> type);  }