Guest User

Untitled

a guest
Jul 17th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. @Component("delegate")
  2. public class GenericDelegate<T> implements GenericInterface<T> {
  3. private final GenericService<T> service;
  4.  
  5. @Autowired
  6. public GenericImplementation(final GenericService<T> service) {
  7. this.service = service;
  8. }
  9.  
  10. @Component
  11. public class UserComponent implements GenericInterface<ConcreteType> {
  12. private final GenericInterface<ConcreteType> delegate;
  13.  
  14. @Autowired
  15. public UserComponent(
  16. @Qualifier("delegate")
  17. final GenericInterface<ConcreteType> delegate) {
  18. this.delegate = delegate;
  19. }
Add Comment
Please, Sign In to add comment