本文整理汇总了Java中org.opendaylight.controller.config.yangjmxgenerator.plugin.ftl.AbstractFactoryTemplate类的典型用法代码示例。如果您正苦于以下问题:Java AbstractFactoryTemplate类的具体用法?Java AbstractFactoryTemplate怎么用?Java AbstractFactoryTemplate使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AbstractFactoryTemplate类属于org.opendaylight.controller.config.yangjmxgenerator.plugin.ftl包,在下文中一共展示了AbstractFactoryTemplate类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toGeneratedObject
import org.opendaylight.controller.config.yangjmxgenerator.plugin.ftl.AbstractFactoryTemplate; //导入依赖的package包/类
public GeneratedObject toGeneratedObject(ModuleMXBeanEntry mbe, Optional<String> copyright) {
FullyQualifiedName absFactoryFQN = new FullyQualifiedName(mbe.getPackageName(), mbe.getAbstractFactoryName());
FullyQualifiedName moduleFQN = new FullyQualifiedName(mbe.getPackageName(), mbe.getStubModuleName());
Optional<String> classJavaDoc = Optional.fromNullable(mbe.getNullableDescription());
AbstractFactoryTemplate abstractFactoryTemplate = TemplateFactory.abstractFactoryTemplateFromMbe(mbe);
Optional<String> header = abstractFactoryTemplate.getHeaderString();
List<FullyQualifiedName> providedServices = new ArrayList<>();
for(String providedService: mbe.getProvidedServices().keySet()) {
providedServices.add(FullyQualifiedName.fromString(providedService));
}
return toGeneratedObject(absFactoryFQN, copyright,
header, classJavaDoc, mbe.getYangModuleQName(),
mbe.getGloballyUniqueName(),
providedServices,
moduleFQN,
abstractFactoryTemplate.getFields());
}
示例2: test
import org.opendaylight.controller.config.yangjmxgenerator.plugin.ftl.AbstractFactoryTemplate; //导入依赖的package包/类
@Test
public void test() {
final ModuleMXBeanEntry mbe = mockMbe("package");
final AbstractFactoryTemplate template = TemplateFactory
.abstractFactoryTemplateFromMbe(mbe);
assertNotNull(template);
}