Search in sources :

Example 1 with ObjectProvider

use of org.mule.runtime.api.ioc.ObjectProvider in project mule by mulesoft.

the class ObjectProviderAwareBeanFactory method getBeansOfType.

@Override
public <T> Map<String, T> getBeansOfType(Class<T> type, boolean includeNonSingletons, boolean allowEagerInit) throws BeansException {
    Map<String, T> beans = new HashMap<>();
    for (ObjectProvider objectProvider : objectProviders) {
        beans.putAll(objectProvider.getObjectsByType(type));
    }
    beans.putAll(super.getBeansOfType(type, includeNonSingletons, allowEagerInit));
    return unmodifiableMap(beans);
}
Also used : HashMap(java.util.HashMap) ConfigurableObjectProvider(org.mule.runtime.api.ioc.ConfigurableObjectProvider) ObjectProvider(org.mule.runtime.api.ioc.ObjectProvider)

Example 2 with ObjectProvider

use of org.mule.runtime.api.ioc.ObjectProvider in project mule by mulesoft.

the class ObjectProviderAwareBeanFactory method getBeansOfType.

@Override
public <T> Map<String, T> getBeansOfType(Class<T> type) throws BeansException {
    Map<String, T> beans = new HashMap<>();
    for (ObjectProvider objectProvider : objectProviders) {
        beans.putAll(objectProvider.getObjectsByType(type));
    }
    beans.putAll(super.getBeansOfType(type));
    return unmodifiableMap(beans);
}
Also used : HashMap(java.util.HashMap) ConfigurableObjectProvider(org.mule.runtime.api.ioc.ConfigurableObjectProvider) ObjectProvider(org.mule.runtime.api.ioc.ObjectProvider)

Aggregations

HashMap (java.util.HashMap)2 ConfigurableObjectProvider (org.mule.runtime.api.ioc.ConfigurableObjectProvider)2 ObjectProvider (org.mule.runtime.api.ioc.ObjectProvider)2