当前位置: 首页>>代码示例>>Java>>正文


Java Store类代码示例

本文整理汇总了Java中org.reflections.Store的典型用法代码示例。如果您正苦于以下问题:Java Store类的具体用法?Java Store怎么用?Java Store使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Store类属于org.reflections包,在下文中一共展示了Store类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: printStoreMap

import org.reflections.Store; //导入依赖的package包/类
/**
 * 打印出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);
        }

    }
}
 
开发者ID:knightliao,项目名称:disconf,代码行数:24,代码来源:ScanPrinterUtils.java

示例2: createDocument

import org.reflections.Store; //导入依赖的package包/类
private Document createDocument(final Reflections reflections) {
    Store map = reflections.getStore();

    Document document = DocumentFactory.getInstance().createDocument();
    Element root = document.addElement("Reflections");
    for (String indexName : map.keySet()) {
        Element indexElement = root.addElement(indexName);
        for (String key : map.get(indexName).keySet()) {
            Element entryElement = indexElement.addElement("entry");
            entryElement.addElement("key").setText(key);
            Element valuesElement = entryElement.addElement("values");
            for (String value : map.get(indexName).get(key)) {
                valuesElement.addElement("value").setText(value);
            }
        }
    }
    return document;
}
 
开发者ID:ronmamo,项目名称:reflections,代码行数:19,代码来源:XmlSerializer.java

示例3: printAll

import org.reflections.Store; //导入依赖的package包/类
public static void printAll(ClassLoader classLoader) {
  Reflections reflections = new Reflections("com.magnet.mmx.protocol");

  // iterate through all and print the JSON schema
  Store store = reflections.getStore();
  Map<String, Multimap<String, String>> map = store.getStoreMap();
  Set<String> entrySet = map.keySet();

  for (String key: entrySet) {
    Multimap<String, String> entries = map.get(key);
    if ("SubTypesScanner".equalsIgnoreCase(key)) {
      for (String key2: entries.keySet()) {
        // get the class and find its sub-types
        try {
          if (schemaHashMap.containsKey(key2)) {
            continue;
          }
          Class<?> clazz = classLoader.loadClass(key2);
          Set<? extends Class<?>> subTypes =
              reflections.getSubTypesOf(clazz);
          for (Class subType: subTypes) {
            if (schemaHashMap.containsKey(subType.getName())) {
              continue;
            }
            System.out.println();
            PojoSchema schema = getJsonSchemaFormat(subType);
            printSchema(schema);
            schemaHashMap.put(subType.getName(), schema);
          }

        } catch (ClassNotFoundException e) {
          e.printStackTrace();
        }
      }
    }
    System.out.println();
  }
}
 
开发者ID:magnetsystems,项目名称:message-server,代码行数:39,代码来源:PojoToJsonSchema.java

示例4: getGwtTestCaseClassNames

import org.reflections.Store; //导入依赖的package包/类
private static Collection<String> getGwtTestCaseClassNames(final Reflections reflections) {
    Store store = reflections.getStore();
    Multimap<String, String> multimap = store.get(GwtTestCaseScanner.class);
    return multimap.values();
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:6,代码来源:GWTTestCaseSuite.java


注:本文中的org.reflections.Store类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。