本文整理匯總了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));
}
}