public static Map computeExportBeans()

in src/main/java/com/epam/gmp/config/GMPConfig.java [102:112]


    public static Map<String, Object> computeExportBeans(ListableBeanFactory beanFactory) {
        Map<String, Object> beans = beanFactory.getBeansWithAnnotation(ExportBinding.class);
        Map<String, Object> bindings = new HashMap<>();
        for (Map.Entry<String, Object> bean : beans.entrySet()) {
            ExportBinding annotationBinding = bean.getValue().getClass().getAnnotation(ExportBinding.class);
            String key = annotationBinding.name().length() == 0 ? bean.getKey() : annotationBinding.name();
            bindings.put(key, bean.getValue());
            if (logger.isDebugEnabled()) logger.debug("Export binding: {}.", key);
        }
        return Collections.unmodifiableMap(bindings);
    }