本文整理匯總了Java中org.opendaylight.controller.config.yangjmxgenerator.ServiceInterfaceEntry.getTypeName方法的典型用法代碼示例。如果您正苦於以下問題:Java ServiceInterfaceEntry.getTypeName方法的具體用法?Java ServiceInterfaceEntry.getTypeName怎麽用?Java ServiceInterfaceEntry.getTypeName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.opendaylight.controller.config.yangjmxgenerator.ServiceInterfaceEntry
的用法示例。
在下文中一共展示了ServiceInterfaceEntry.getTypeName方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: serviceInterfaceFromSie
import org.opendaylight.controller.config.yangjmxgenerator.ServiceInterfaceEntry; //導入方法依賴的package包/類
public static GeneralInterfaceTemplate serviceInterfaceFromSie(
final ServiceInterfaceEntry sie) {
final List<String> extendedInterfaces = Lists
.newArrayList(AbstractServiceInterface.class.getCanonicalName());
if (sie.getBase().isPresent()) {
extendedInterfaces.add(sie.getBase().get().getFullyQualifiedName());
}
// FIXME header
final GeneralInterfaceTemplate sieTemplate = new GeneralInterfaceTemplate(
getHeaderFromEntry(sie), sie.getPackageName(),
sie.getTypeName(), extendedInterfaces,
Lists.<MethodDeclaration> newArrayList());
sieTemplate.setJavadoc(sie.getNullableDescription());
if (sie.getNullableDescription() != null) {
sieTemplate.getAnnotations().add(
Annotation.createDescriptionAnnotation(sie
.getNullableDescription()));
}
sieTemplate.getAnnotations().addAll(Annotation.createSieAnnotations(sie));
return sieTemplate;
}
示例2: writeSie
import org.opendaylight.controller.config.yangjmxgenerator.ServiceInterfaceEntry; //導入方法依賴的package包/類
public File writeSie(final ServiceInterfaceEntry sie, final File outputBaseDir) {
try {
GeneralInterfaceTemplate generalInterfaceTemplate = TemplateFactory.serviceInterfaceFromSie(sie);
GeneratedObject go = new GenericGeneratedObjectFactory().toGeneratedObject(generalInterfaceTemplate, COPYRIGHT);
return go.persist(outputBaseDir).get().getValue();
} catch (Exception e) {
String message = "An error occurred during Service interface generating, sie:"
+ sie.getTypeName() + ", " + sie.getFullyQualifiedName();
LOG.error(message, e);
throw new RuntimeException(message, e);
}
}