public <X> List<ParameterInjectionPoint<?, X>> getParameterInjectionPoints(EnhancedAnnotatedCallable<?, X, ?> callable, Bean<?> declaringBean, Class<?> declaringComponentClass, BeanManagerImpl manager, boolean observerOrDisposer) { List<ParameterInjectionPoint<?, X>> parameters = new ArrayList<ParameterInjectionPoint<?, X>>(); /* * bean that the injection point belongs to this is null for observer and disposer methods */ Bean<?> bean = null; if (!observerOrDisposer) { bean = declaringBean; } for (EnhancedAnnotatedParameter<?, X> parameter : callable.getEnhancedParameters()) { if (isSpecialParameter(parameter)) { parameters.add(SpecialParameterInjectionPoint.of(parameter, bean, declaringBean.getBeanClass(), manager)); } else { parameters.add(createParameterInjectionPoint(parameter, bean, declaringComponentClass, manager)); } } return ImmutableList.copyOf(parameters); }
public <X> List<ParameterInjectionPoint<?, X>> getParameterInjectionPoints(EnhancedAnnotatedCallable<?, X, ?> callable, Bean<?> declaringBean, Class<?> declaringComponentClass, BeanManagerImpl manager, boolean observerOrDisposer) { List<ParameterInjectionPoint<?, X>> parameters = new ArrayList<ParameterInjectionPoint<?, X>>(); /* * bean that the injection point belongs to this is null for observer and disposer methods */ Bean<?> bean = null; if (!observerOrDisposer) { bean = declaringBean; } for (EnhancedAnnotatedParameter<?, X> parameter : callable.getEnhancedParameters()) { if (isSpecialParameter(parameter)) { parameters.add(SpecialParameterInjectionPoint.of(parameter, bean, declaringBean.getBeanClass(), manager)); } else { parameters.add(createParameterInjectionPoint(parameter, bean, declaringComponentClass, manager)); } } return ImmutableList.copyOf(parameters); }
public <X> List<ParameterInjectionPoint<?, X>> getParameterInjectionPoints(EnhancedAnnotatedCallable<?, X, ?> callable, Bean<?> declaringBean, Class<?> declaringComponentClass, BeanManagerImpl manager, boolean observerOrDisposer) { List<ParameterInjectionPoint<?, X>> parameters = new ArrayList<ParameterInjectionPoint<?, X>>(); /* * bean that the injection point belongs to this is null for observer and disposer methods */ Bean<?> bean = null; if (!observerOrDisposer) { bean = declaringBean; } for (EnhancedAnnotatedParameter<?, X> parameter : callable.getEnhancedParameters()) { if (isSpecialParameter(parameter)) { parameters.add(SpecialParameterInjectionPoint.of(parameter, bean, declaringBean.getBeanClass(), manager)); } else { parameters.add(createParameterInjectionPoint(parameter, bean, declaringComponentClass, manager)); } } return ImmutableList.copyOf(parameters); }
public <X> List<ParameterInjectionPoint<?, X>> getParameterInjectionPoints(EnhancedAnnotatedCallable<?, X, ?> callable, Bean<?> declaringBean, Class<?> declaringComponentClass, BeanManagerImpl manager, boolean observerOrDisposer) { List<ParameterInjectionPoint<?, X>> parameters = new ArrayList<ParameterInjectionPoint<?, X>>(); /* * bean that the injection point belongs to this is null for observer and disposer methods */ Bean<?> bean = null; if (!observerOrDisposer) { bean = declaringBean; } for (EnhancedAnnotatedParameter<?, X> parameter : callable.getEnhancedParameters()) { if (isSpecialParameter(parameter)) { parameters.add(SpecialParameterInjectionPoint.of(parameter, bean, declaringBean.getBeanClass(), manager)); } else { parameters.add(createParameterInjectionPoint(parameter, bean, declaringComponentClass, manager)); } } return ImmutableList.copyOf(parameters); }
public <X> List<ParameterInjectionPoint<?, X>> getParameterInjectionPoints(EnhancedAnnotatedCallable<?, X, ?> callable, Bean<?> declaringBean, Class<?> declaringComponentClass, BeanManagerImpl manager, boolean observerOrDisposer) { List<ParameterInjectionPoint<?, X>> parameters = new ArrayList<ParameterInjectionPoint<?, X>>(); /* * bean that the injection point belongs to this is null for observer and disposer methods */ Bean<?> bean = null; if (!observerOrDisposer) { bean = declaringBean; } for (EnhancedAnnotatedParameter<?, X> parameter : callable.getEnhancedParameters()) { if (isSpecialParameter(parameter)) { parameters.add(SpecialParameterInjectionPoint.of(parameter, bean, declaringBean.getBeanClass(), manager)); } else { parameters.add(createParameterInjectionPoint(parameter, bean, declaringComponentClass, manager)); } } return immutableListView(parameters); }
public <X> List<ParameterInjectionPoint<?, X>> getParameterInjectionPoints(EnhancedAnnotatedCallable<?, X, ?> callable, Bean<?> declaringBean, Class<?> declaringComponentClass, BeanManagerImpl manager, boolean observerOrDisposer) { List<ParameterInjectionPoint<?, X>> parameters = new ArrayList<ParameterInjectionPoint<?, X>>(); /* * bean that the injection point belongs to this is null for observer and disposer methods */ Bean<?> bean = null; if (!observerOrDisposer) { bean = declaringBean; } for (EnhancedAnnotatedParameter<?, X> parameter : callable.getEnhancedParameters()) { if (isSpecialParameter(parameter)) { parameters.add(SpecialParameterInjectionPoint.of(parameter, bean, declaringBean.getBeanClass(), manager)); } else { parameters.add(createParameterInjectionPoint(parameter, bean, declaringComponentClass, manager)); } } return ImmutableList.copyOf(parameters); }
protected <T> Set<ResourceInjection<?>> createResourceInjections(Iterable<EnhancedAnnotatedField<?, ? super T>> fields, Iterable<EnhancedAnnotatedMethod<?, ? super T>> methods, Bean<?> declaringBean, Class<?> declaringClass, BeanManagerImpl manager) { ImmutableSet.Builder<ResourceInjection<?>> resourceInjections = ImmutableSet.builder(); S injectionServices = getInjectionServices(manager); C processorContext = getProcessorContext(manager); for (EnhancedAnnotatedField<?, ? super T> field : fields) { if (accept(field, processorContext)) { resourceInjections.add(createFieldResourceInjection( InjectionPointFactory.silentInstance().createFieldInjectionPoint(field, declaringBean, declaringClass, manager), injectionServices, processorContext)); } } for (EnhancedAnnotatedMethod<?, ?> method : methods) { if (method.getParameters().size() != 1) { throw UtilLogger.LOG.resourceSetterInjectionNotAJavabean(method); } if (accept(method, processorContext)) { EnhancedAnnotatedParameter<?, ?> parameter = method.getEnhancedParameters().get(0); resourceInjections.add(createSetterResourceInjection( InjectionPointFactory.silentInstance().createParameterInjectionPoint(parameter, declaringBean, declaringClass, manager), injectionServices, processorContext)); } } return resourceInjections.build(); }
protected <T> Set<ResourceInjection<?>> createResourceInjections(Iterable<EnhancedAnnotatedField<?, ? super T>> fields, Iterable<EnhancedAnnotatedMethod<?, ? super T>> methods, Bean<?> declaringBean, Class<?> declaringClass, BeanManagerImpl manager) { ImmutableSet.Builder<ResourceInjection<?>> resourceInjections = ImmutableSet.builder(); S injectionServices = getInjectionServices(manager); C processorContext = getProcessorContext(manager); for (EnhancedAnnotatedField<?, ? super T> field : fields) { if (accept(field, processorContext)) { resourceInjections.add(createFieldResourceInjection( InjectionPointFactory.silentInstance().createFieldInjectionPoint(field, declaringBean, declaringClass, manager), injectionServices, processorContext)); } } for (EnhancedAnnotatedMethod<?, ?> method : methods) { if (method.getParameters().size() != 1) { throw UtilLogger.LOG.resourceSetterInjectionNotAJavabean(method); } if (accept(method, processorContext)) { EnhancedAnnotatedParameter<?, ?> parameter = method.getEnhancedParameters().get(0); resourceInjections.add(createSetterResourceInjection( InjectionPointFactory.silentInstance().createParameterInjectionPoint(parameter, declaringBean, declaringClass, manager), injectionServices, processorContext)); } } return resourceInjections.build(); }
protected <T> Set<ResourceInjection<?>> createResourceInjections(Iterable<EnhancedAnnotatedField<?, ? super T>> fields, Iterable<EnhancedAnnotatedMethod<?, ? super T>> methods, Bean<?> declaringBean, Class<?> declaringClass, BeanManagerImpl manager) { ImmutableSet.Builder<ResourceInjection<?>> resourceInjections = ImmutableSet.builder(); S injectionServices = getInjectionServices(manager); C processorContext = getProcessorContext(manager); for (EnhancedAnnotatedField<?, ? super T> field : fields) { if (accept(field, processorContext)) { resourceInjections.add(createFieldResourceInjection( InjectionPointFactory.silentInstance().createFieldInjectionPoint(field, declaringBean, declaringClass, manager), injectionServices, processorContext)); } } for (EnhancedAnnotatedMethod<?, ?> method : methods) { if (method.getParameters().size() != 1) { throw UtilLogger.LOG.resourceSetterInjectionNotAJavabean(method); } if (accept(method, processorContext)) { EnhancedAnnotatedParameter<?, ?> parameter = method.getEnhancedParameters().get(0); resourceInjections.add(createSetterResourceInjection( InjectionPointFactory.silentInstance().createParameterInjectionPoint(parameter, declaringBean, declaringClass, manager), injectionServices, processorContext)); } } return resourceInjections.build(); }
protected <T> Set<ResourceInjection<?>> createResourceInjections(Iterable<EnhancedAnnotatedField<?, ? super T>> fields, Iterable<EnhancedAnnotatedMethod<?, ? super T>> methods, Bean<?> declaringBean, Class<?> declaringClass, BeanManagerImpl manager) { ImmutableSet.Builder<ResourceInjection<?>> resourceInjections = ImmutableSet.builder(); S injectionServices = getInjectionServices(manager); C processorContext = getProcessorContext(manager); for (EnhancedAnnotatedField<?, ? super T> field : fields) { if (accept(field, processorContext)) { resourceInjections.add(createFieldResourceInjection( InjectionPointFactory.silentInstance().createFieldInjectionPoint(field, declaringBean, declaringClass, manager), injectionServices, processorContext)); } } for (EnhancedAnnotatedMethod<?, ?> method : methods) { if (method.getParameters().size() != 1) { throw UtilLogger.LOG.resourceSetterInjectionNotAJavabean(method); } if (accept(method, processorContext)) { EnhancedAnnotatedParameter<?, ?> parameter = method.getEnhancedParameters().get(0); resourceInjections.add(createSetterResourceInjection( InjectionPointFactory.silentInstance().createParameterInjectionPoint(parameter, declaringBean, declaringClass, manager), injectionServices, processorContext)); } } return resourceInjections.build(); }
protected <T> Set<ResourceInjection<?>> createResourceInjections(Iterable<EnhancedAnnotatedField<?, ? super T>> fields, Iterable<EnhancedAnnotatedMethod<?, ? super T>> methods, Bean<?> declaringBean, Class<?> declaringClass, BeanManagerImpl manager) { ImmutableSet.Builder<ResourceInjection<?>> resourceInjections = ImmutableSet.builder(); S injectionServices = getInjectionServices(manager); C processorContext = getProcessorContext(manager); for (EnhancedAnnotatedField<?, ? super T> field : fields) { if (accept(field, processorContext)) { resourceInjections.add(createFieldResourceInjection( InjectionPointFactory.silentInstance().createFieldInjectionPoint(field, declaringBean, declaringClass, manager), injectionServices, processorContext)); } } for (EnhancedAnnotatedMethod<?, ?> method : methods) { if (method.getParameters().size() != 1) { throw UtilLogger.LOG.resourceSetterInjectionNotAJavabean(method); } if (accept(method, processorContext)) { EnhancedAnnotatedParameter<?, ?> parameter = method.getEnhancedParameters().get(0); resourceInjections.add(createSetterResourceInjection( InjectionPointFactory.silentInstance().createParameterInjectionPoint(parameter, declaringBean, declaringClass, manager), injectionServices, processorContext)); } } return resourceInjections.build(); }
InjectionPointFactory.silentInstance().createParameterInjectionPoint( method.getEnhancedParameters().get(0), declaringBean, type.getJavaClass(), manager), injectionServices, apiAbstraction));