Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for(InjectionPoint ip: injectionTarget.getInjectionPoints()) {
- if(ip.getMember() instanceof Field) {
- Set<Bean<?>> beans = manager.getBeans(ip.getType(), filterNonQualifiers(manager, ip.getAnnotated().getAnnotations()));
- Bean<?> bean = manager.resolve(beans);
- Object beanInst = manager.getContext(bean.getScope()).get(bean);
- try {
- ((Field)ip.getMember()).set(instance, beanInst);
- }
- catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment