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


Java Config.getKeysStartingWith方法代码示例

本文整理汇总了Java中gov.nasa.jpf.Config.getKeysStartingWith方法的典型用法代码示例。如果您正苦于以下问题:Java Config.getKeysStartingWith方法的具体用法?Java Config.getKeysStartingWith怎么用?Java Config.getKeysStartingWith使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gov.nasa.jpf.Config的用法示例。


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

示例1: createCopy

import gov.nasa.jpf.Config; //导入方法依赖的package包/类
public static Config createCopy(Config in) {
  Config conf = new Config(new String[] {});
  for (String key : in.getKeysStartingWith("")) {
    conf.setProperty(key, in.getProperty(key));
  }
  return conf;
}
 
开发者ID:psycopaths,项目名称:jdart,代码行数:8,代码来源:ConfigUtil.java

示例2: getGlobalArgs

import gov.nasa.jpf.Config; //导入方法依赖的package包/类
protected static ArrayList<GlobalArg> getGlobalArgs() {
  // NOTE - this is only set if we execute tests from build.xml
  Config globalConf = RunTest.getConfig();
  if (globalConf != null){
    ArrayList<GlobalArg> list = new ArrayList<GlobalArg>();

    //--- the "test.<key>" specs
    String[] testKeys = globalConf.getKeysStartingWith("test.");
    if (testKeys.length > 0){
      for (String key : testKeys){
        String val = globalConf.getString(key);
        // <2do> this is a hack to avoid the problem of not being able to store
        // empty/nil/null values in the global config (they are removed during global config init)
        if (val.equals("REMOVE")){
          val = null;
        }
        
        key = key.substring(5);
        
        list.add(new GlobalArg(key,val));
      }
    }

    return list;
  }

  return null;
}
 
开发者ID:grzesuav,项目名称:gjpf-core,代码行数:29,代码来源:TestJPF.java

示例3: parseCategories

import gov.nasa.jpf.Config; //导入方法依赖的package包/类
protected List<Category> parseCategories (Config conf){
  ArrayList<Category> list = new ArrayList<Category>();
  Category category = null;

  for (String key : conf.getKeysStartingWith("cgrm.")){
    String[] kc = conf.getKeyComponents(key);
    if (kc.length == 3){
      String k = kc[1];
      if (category != null){
        if (!category.id.equals(k)){
          addCategory(list, category);

          category = new Category(k);
        }
      } else {
        category = new Category(k);
      }

      k = kc[2];

      if ("cg_class".equals(k)){
        category.cgClass = conf.getClass(key);

      } else if ("locations".equals(k)){
        parseLocationSpecs(category.locations, conf.getStringArray(key));

      } else if ("method_bodies".equals(k)){
        parseMethodSpecs(category.methodBodies, conf.getStringArray(key));

      } else if ("method_calls".equals(k)){
        parseMethodSpecs(category.methodCalls, conf.getStringArray(key));

      } else {
        // we might have more options in the future
        log.warning("illegal CGRemover option: ", key);
      }

    } else {
      log.warning("illegal CGRemover key: ", key);
    }
  }

  addCategory(list, category);
  return list;
}
 
开发者ID:grzesuav,项目名称:gjpf-core,代码行数:46,代码来源:CGRemover.java


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