/** * Register/bind custom provider classes. Registered providers will be handled * always as Singletons unless annotated by {@link PerLookup}. * * @param classes custom provider classes. */ public void bindClasses(final Class<?>... classes) { if (classes != null && classes.length > 0) { final DynamicConfiguration dc = Injections.getConfiguration(locator); for (final Class<?> clazz : classes) { bindClass(clazz, locator, dc, false); } dc.commit(); } }
/** * Register/bind custom provider classes. Registered providers will be handled * always as Singletons unless annotated by {@link PerLookup}. * * @param classes custom provider classes. */ public void bindClasses(final Class<?>... classes) { if (classes != null && classes.length > 0) { final DynamicConfiguration dc = Injections.getConfiguration(locator); for (final Class<?> clazz : classes) { bindClass(clazz, locator, dc, false); } dc.commit(); } }
/** * Register/bind custom provider classes. Registered providers will be handled * always as Singletons unless annotated by {@link PerLookup}. * * @param classes custom provider classes. */ public void bindClasses(final Class<?>... classes) { if (classes != null && classes.length > 0) { final DynamicConfiguration dc = Injections.getConfiguration(locator); for (final Class<?> clazz : classes) { bindClass(clazz, locator, dc, false); } dc.commit(); } }
/** * 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> * 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(final Iterable<Class<?>> classes, final boolean bindResources) { if (classes == null || !classes.iterator().hasNext()) { return; } final DynamicConfiguration dc = Injections.getConfiguration(locator); for (final Class<?> clazz : classes) { bindClass(clazz, locator, dc, bindResources); } dc.commit(); }
/** * 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> * 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(final Iterable<Class<?>> classes, final boolean bindResources) { if (classes == null || !classes.iterator().hasNext()) { return; } final DynamicConfiguration dc = Injections.getConfiguration(locator); for (final Class<?> clazz : classes) { bindClass(clazz, locator, dc, bindResources); } dc.commit(); }
/** * 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> * 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(final Iterable<Class<?>> classes, final boolean bindResources) { if (classes == null || !classes.iterator().hasNext()) { return; } final DynamicConfiguration dc = Injections.getConfiguration(locator); for (final Class<?> clazz : classes) { bindClass(clazz, locator, dc, bindResources); } dc.commit(); }