@Test public void shouldRegisterTypesOnDeserializers() throws Exception { handler.handle(MyDeserializer.class); verify(deserializers).register(MyDeserializer.class); }
@SuppressWarnings("unchecked") public void handle(Class<?> type) { if (!Deserializer.class.isAssignableFrom(type)) { throw new IllegalArgumentException(type + " must implement Deserializer"); } if (BaseComponents.getDeserializers().contains(type)) { logger.debug("Ignoring default deserializer {}", type); return; } deserializers.register((Class<? extends Deserializer>) type); }
DeserializesHandler implements StereotypeHandler { @SuppressWarnings("unchecked") public void handle(Class<?> type) { if (!Deserializer.class.isAssignableFrom(type)) { throw new IllegalArgumentException(type + " must implement Deserializer"); } if (BaseComponents.getDeserializers().contains(type)) { logger.debug("Ignoring default deserializer {}", type); return; } deserializers.register((Class<? extends Deserializer>) type); } }
DeserializesHandler implements StereotypeHandler { @SuppressWarnings("unchecked") public void handle(Class<?> type) { if (!Deserializer.class.isAssignableFrom(type)) { throw new IllegalArgumentException(type + " must implement Deserializer"); } if (BaseComponents.getDeserializers().contains(type)) { logger.debug("Ignoring default deserializer {}", type); return; } deserializers.register((Class<? extends Deserializer>) type); } DeserializesHandler(Deserializers deserializers); }
DeserializesHandler implements StereotypeHandler { @SuppressWarnings("unchecked") public void handle(Class<?> type) { if (!Deserializer.class.isAssignableFrom(type)) { throw new IllegalArgumentException(type + " must implement Deserializer"); } if (BaseComponents.getDeserializers().contains(type)) { logger.debug("Ignoring default deserializer {}", type); return; } deserializers.register((Class<? extends Deserializer>) type); } DeserializesHandler(Deserializers deserializers); @SuppressWarnings("unchecked") void handle(Class<?> type); Class<? extends Annotation> stereotype(); }
DeserializesHandler implements StereotypeHandler { @SuppressWarnings("unchecked") public void handle(Class<?> type) { if (!Deserializer.class.isAssignableFrom(type)) { throw new IllegalArgumentException(type + " must implement Deserializer"); } if (BaseComponents.getDeserializers().contains(type)) { logger.debug("Ignoring default deserializer {}", type); return; } deserializers.register((Class<? extends Deserializer>) type); } DeserializesHandler(Deserializers deserializers); @SuppressWarnings("unchecked") void handle(Class<?> type); Class<? extends Annotation> stereotype();  }