/** * Register/bind custom provider classes that may also be resources. Registered * providers/resources will be handled always as Singletons unless annotated by * {@link PerLookup}. * <p> * <p> * If {@code bindAsResources} is set to {@code true}, the providers will also be bound * as resources. * </p> * * @param classes custom provider classes. * @param bindResources if {@code true}, the provider classes will also be bound as * resources. */ public void bindClasses(Collection<Class<?>> classes, boolean bindResources) { List<Binder> binders = classes.stream() .map(clazz -> createClassBinders(clazz, bindResources)) .collect(Collectors.toList()); injectionManager.register(CompositeBinder.wrap(binders)); }
/** * Register/bind custom provider classes that may also be resources. Registered * providers/resources will be handled always as Singletons unless annotated by * {@link PerLookup}. * <p> * <p> * If {@code bindAsResources} is set to {@code true}, the providers will also be bound * as resources. * </p> * * @param classes custom provider classes. * @param bindResources if {@code true}, the provider classes will also be bound as * resources. */ public void bindClasses(Collection<Class<?>> classes, boolean bindResources) { List<Binder> binders = classes.stream() .map(clazz -> createClassBinders(clazz, bindResources)) .collect(Collectors.toList()); injectionManager.register(CompositeBinder.wrap(binders)); }
/** * Register/bind custom provider classes that may also be resources. Registered * providers/resources will be handled always as Singletons unless annotated by * {@link PerLookup}. * <p> * <p> * If {@code bindAsResources} is set to {@code true}, the providers will also be bound * as resources. * </p> * * @param classes custom provider classes. * @param bindResources if {@code true}, the provider classes will also be bound as * resources. */ public void bindClasses(Collection<Class<?>> classes, boolean bindResources) { List<Binder> binders = classes.stream() .map(clazz -> createClassBinders(clazz, bindResources)) .collect(Collectors.toList()); injectionManager.register(CompositeBinder.wrap(binders)); }
/** * Register/bind custom provider classes that may also be resources. Registered * providers/resources will be handled always as Singletons unless annotated by * {@link PerLookup}. * <p> * <p> * If {@code bindAsResources} is set to {@code true}, the providers will also be bound * as resources. * </p> * * @param classes custom provider classes. * @param bindResources if {@code true}, the provider classes will also be bound as * resources. */ public void bindClasses(Collection<Class<?>> classes, boolean bindResources) { List<Binder> binders = classes.stream() .map(clazz -> createClassBinders(clazz, bindResources)) .collect(Collectors.toList()); injectionManager.register(CompositeBinder.wrap(binders)); }