org.reflections.Store.getStoreMap()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(100)

本文整理了Java中org.reflections.Store.getStoreMap()方法的一些代码示例,展示了Store.getStoreMap()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Store.getStoreMap()方法的具体详情如下:
包路径:org.reflections.Store
类名称:Store
方法名:getStoreMap

Store.getStoreMap介绍

暂无

代码示例

代码示例来源:origin: knightliao/disconf

/**
 * 打印出StoreMap的数据
 */
public static void printStoreMap(Reflections reflections) {
  LOGGER.info("Now we will print store map......");
  Store store = reflections.getStore();
  Map<String/* indexName */, Multimap<String, String>> storeMap = store.getStoreMap();
  for (String indexName : storeMap.keySet()) {
    LOGGER.info("====================================");
    LOGGER.info("indexName:" + indexName);
    Multimap<String, String> multimap = storeMap.get(indexName);
    for (String firstName : multimap.keySet()) {
      Collection<String> lastNames = multimap.get(firstName);
      LOGGER.info("\t\t" + firstName + ": " + lastNames);
    }
  }
}

代码示例来源:origin: com.github.albfernandez.richfaces/richfaces-core

public Collection<Class<?>> getMarkedClasses() {
    Map<String, Multimap<String, String>> storeMap = getStore().getStoreMap();
    Multimap<String, String> scannerMMap = storeMap.get(MarkerResourcesScanner.class.getName());
    if (scannerMMap == null) {
      return Collections.emptySet();
    }

    return Collections2.filter(Collections2.transform(scannerMMap.get(MarkerResourcesScanner.STORE_KEY), CLASS_FOR_NAME),
        Predicates.notNull());
  }
}

代码示例来源:origin: com.baidu.disconf/disconf-client

/**
 * 打印出StoreMap的数据
 */
public static void printStoreMap(Reflections reflections) {
  LOGGER.info("Now we will print store map......");
  Store store = reflections.getStore();
  Map<String/* indexName */, Multimap<String, String>> storeMap = store.getStoreMap();
  for (String indexName : storeMap.keySet()) {
    LOGGER.info("====================================");
    LOGGER.info("indexName:" + indexName);
    Multimap<String, String> multimap = storeMap.get(indexName);
    for (String firstName : multimap.keySet()) {
      Collection<String> lastNames = multimap.get(firstName);
      LOGGER.info("\t\t" + firstName + ": " + lastNames);
    }
  }
}

相关文章