本文整理汇总了Java中org.apache.jmeter.samplers.gui.AbstractSamplerGui类的典型用法代码示例。如果您正苦于以下问题:Java AbstractSamplerGui类的具体用法?Java AbstractSamplerGui怎么用?Java AbstractSamplerGui使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AbstractSamplerGui类属于org.apache.jmeter.samplers.gui包,在下文中一共展示了AbstractSamplerGui类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupGuiClasses
import org.apache.jmeter.samplers.gui.AbstractSamplerGui; //导入依赖的package包/类
/**
* Setup GUI class
* @param menuCategories List<String> menu categories
* @return number of matches
*/
private int setupGuiClasses(List<String> menuCategories ) {
int matches = 0;// How many classes can we assign from?
// TODO: there must be a nicer way...
BeanDescriptor bd = beanInfo.getBeanDescriptor();
if (Assertion.class.isAssignableFrom(testBeanClass)) {
menuCategories.add(MenuFactory.ASSERTIONS);
bd.setValue(TestElement.GUI_CLASS, AbstractAssertionGui.class.getName());
matches++;
}
if (ConfigElement.class.isAssignableFrom(testBeanClass)) {
menuCategories.add(MenuFactory.CONFIG_ELEMENTS);
bd.setValue(TestElement.GUI_CLASS, AbstractConfigGui.class.getName());
matches++;
}
if (Controller.class.isAssignableFrom(testBeanClass)) {
menuCategories.add(MenuFactory.CONTROLLERS);
bd.setValue(TestElement.GUI_CLASS, AbstractControllerGui.class.getName());
matches++;
}
if (Visualizer.class.isAssignableFrom(testBeanClass)) {
menuCategories.add(MenuFactory.LISTENERS);
bd.setValue(TestElement.GUI_CLASS, AbstractVisualizer.class.getName());
matches++;
}
if (PostProcessor.class.isAssignableFrom(testBeanClass)) {
menuCategories.add(MenuFactory.POST_PROCESSORS);
bd.setValue(TestElement.GUI_CLASS, AbstractPostProcessorGui.class.getName());
matches++;
}
if (PreProcessor.class.isAssignableFrom(testBeanClass)) {
menuCategories.add(MenuFactory.PRE_PROCESSORS);
bd.setValue(TestElement.GUI_CLASS, AbstractPreProcessorGui.class.getName());
matches++;
}
if (Sampler.class.isAssignableFrom(testBeanClass)) {
menuCategories.add(MenuFactory.SAMPLERS);
bd.setValue(TestElement.GUI_CLASS, AbstractSamplerGui.class.getName());
matches++;
}
if (Timer.class.isAssignableFrom(testBeanClass)) {
menuCategories.add(MenuFactory.TIMERS);
bd.setValue(TestElement.GUI_CLASS, AbstractTimerGui.class.getName());
matches++;
}
return matches;
}