本文整理汇总了Java中gherkin.formatter.JSONFormatter类的典型用法代码示例。如果您正苦于以下问题:Java JSONFormatter类的具体用法?Java JSONFormatter怎么用?Java JSONFormatter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
JSONFormatter类属于gherkin.formatter包,在下文中一共展示了JSONFormatter类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getGson
import gherkin.formatter.JSONFormatter; //导入依赖的package包/类
private Gson getGson() {
try {
Method gsonMethod = JSONFormatter.class.getDeclaredMethod("gson");
gsonMethod.setAccessible(true);
return (Gson) gsonMethod.invoke(this.jsonFormatter);
} catch (IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
e.printStackTrace();
}
return null;
}
示例2: getFeatureMaps
import gherkin.formatter.JSONFormatter; //导入依赖的package包/类
private List<Map<String, Object>> getFeatureMaps() {
try {
Field field = JSONFormatter.class.getDeclaredField("featureMaps");
field.setAccessible(true);
return (List<Map<String, Object>>) field.get(this.jsonFormatter);
} catch (IllegalAccessException | NoSuchFieldException e) {
e.printStackTrace();
}
return null;
}
示例3: result
import gherkin.formatter.JSONFormatter; //导入依赖的package包/类
@Override
public void result(Result arg0) {
Formatter wrapped = threadAwareWrappedFormatter.getWrapped();
if(wrapped instanceof JSONFormatter) {
((JSONFormatter) wrapped).result(arg0);
}
else {
getWrapped().result(arg0);
}
}
示例4: CukesJsonFormatter
import gherkin.formatter.JSONFormatter; //导入依赖的package包/类
public CukesJsonFormatter(Appendable out) throws Exception {
super(out);
contextInflater = SingletonObjectFactory.instance().getInstance(ContextInflater.class);
getSteps = JSONFormatter.class.getDeclaredMethod("getSteps");
getSteps.setAccessible(true);
}
示例5: WrappedJSONFormatter
import gherkin.formatter.JSONFormatter; //导入依赖的package包/类
public WrappedJSONFormatter(JSONFormatter wrapped) {
this.wrapped = wrapped;
}