本文整理匯總了Java中org.dashbuilder.dataset.DataSetGenerator類的典型用法代碼示例。如果您正苦於以下問題:Java DataSetGenerator類的具體用法?Java DataSetGenerator怎麽用?Java DataSetGenerator使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
DataSetGenerator類屬於org.dashbuilder.dataset包,在下文中一共展示了DataSetGenerator類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: init
import org.dashbuilder.dataset.DataSetGenerator; //導入依賴的package包/類
@PostConstruct
protected void init() {
Set<Bean<?>> beans = beanManager.getBeans(DataSetGenerator.class);
for (Bean<?> bean : beans) {
CreationalContext<?> ctx = beanManager.createCreationalContext(bean);
DataSetGenerator generator = (DataSetGenerator) beanManager.getReference(bean, DataSetGenerator.class, ctx);
generatorMap.put(bean.getBeanClass().getName(), generator);
}
}
示例2: lookupGenerator
import org.dashbuilder.dataset.DataSetGenerator; //導入依賴的package包/類
public DataSetGenerator lookupGenerator(DataSetDef def) {
BeanDataSetDef beanDef = (BeanDataSetDef) def;
String beanName = beanDef.getGeneratorClass();
DataSetGenerator generator = generatorMap.get(beanName);
if (generator != null ) {
return generator;
} else {
throw new IllegalArgumentException("Data set generator class not found: " + beanName);
}
}