本文整理汇总了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;
}
示例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;
}
示例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;
}