本文整理汇总了Java中org.jbehave.core.model.Meta.getPropertyNames方法的典型用法代码示例。如果您正苦于以下问题:Java Meta.getPropertyNames方法的具体用法?Java Meta.getPropertyNames怎么用?Java Meta.getPropertyNames使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jbehave.core.model.Meta
的用法示例。
在下文中一共展示了Meta.getPropertyNames方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: match
import org.jbehave.core.model.Meta; //导入方法依赖的package包/类
private boolean match(Properties properties, Meta meta) {
boolean matches = false;
for (Object key : properties.keySet()) {
String property = (String) properties.get(key);
for (String metaName : meta.getPropertyNames()) {
if (key.equals(metaName)) {
String value = meta.getProperty(metaName);
if (StringUtils.isBlank(value)) {
matches = true;
} else if (property.contains("*")) {
matches = value.matches(property.replace("*", ".*"));
} else {
matches = properties.get(key).equals(value);
}
}
if (matches) {
break;
}
}
}
return matches;
}
示例2: toString
import org.jbehave.core.model.Meta; //导入方法依赖的package包/类
private String toString(Meta meta)
{
StringBuilder buf = new StringBuilder();
if (!meta.isEmpty()) {
for (String name : meta.getPropertyNames()) {
buf.append(String.format(" @%s: %s \n", name, meta.getProperty(name)));
}
}
return buf.toString();
}
示例3: processMetaTags
import org.jbehave.core.model.Meta; //导入方法依赖的package包/类
protected void processMetaTags(XRefRoot root) {
Meta storyMeta = story.getMeta();
for (String next : storyMeta.getPropertyNames()) {
String property = next + "=" + storyMeta.getProperty(next);
addMetaProperty(property, root.meta);
String newMeta = appendMetaProperty(property, this.meta);
if (newMeta != null) {
this.meta = newMeta;
}
}
}
示例4: print
import org.jbehave.core.model.Meta; //导入方法依赖的package包/类
private void print(Meta meta) {
print(format("metaStart", "{0}\n", keywords.meta()));
for (String name : meta.getPropertyNames()) {
print(format("metaProperty", "{0}{1} {2}", keywords.metaProperty(), name, meta.getProperty(name)));
}
print(format("metaEnd", "\n"));
}
示例5: addMetaParameters
import org.jbehave.core.model.Meta; //导入方法依赖的package包/类
private void addMetaParameters(Map<String, String> storyParameters, Meta meta) {
for (String name : meta.getPropertyNames()) {
storyParameters.put(name, meta.getProperty(name));
}
}