/** * Create a {@link SetterInjector}. * * @param monitor * @param lifecycle * @param componentProps * @param key The component's key * @param impl The class of the bean. * @return Returns a new {@link SetterInjector}. * @throws PicoCompositionException if dependencies cannot be solved */ public <T> ComponentAdapter<T> createComponentAdapter(final ComponentMonitor monitor, final LifecycleStrategy lifecycle, final Properties componentProps, final Object key, final Class<T> impl, final ConstructorParameters constructorParams, final FieldParameters[] fieldParams, final MethodParameters[] methodParams) throws PicoCompositionException { boolean useNames = AbstractBehavior.arePropertiesPresent(componentProps, Characteristics.USE_NAMES, true); SetterInjector<T> setterInjector = new SetterInjector<T>(key, impl, monitor, prefix, useNames, notThisOneThough != null ? notThisOneThough : "", optional, methodParams); Injector<T> injector = monitor.newInjector(setterInjector); return wrapLifeCycle(injector, lifecycle); }
/** * Create a {@link SetterInjector}. * * @param monitor * @param lifecycle * @param componentProps * @param key The component's key * @param impl The class of the bean. * @return Returns a new {@link SetterInjector}. * @throws PicoCompositionException if dependencies cannot be solved */ public <T> ComponentAdapter<T> createComponentAdapter(final ComponentMonitor monitor, final LifecycleStrategy lifecycle, final Properties componentProps, final Object key, final Class<T> impl, final ConstructorParameters constructorParams, final FieldParameters[] fieldParams, final MethodParameters[] methodParams) throws PicoCompositionException { boolean useNames = AbstractBehavior.arePropertiesPresent(componentProps, Characteristics.USE_NAMES, true); SetterInjector<T> setterInjector = new SetterInjector<T>(key, impl, monitor, prefix, useNames, notThisOneThough != null ? notThisOneThough : "", optional, methodParams); Injector<T> injector = monitor.newInjector(setterInjector); return wrapLifeCycle(injector, lifecycle); }