X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fbinding%2Fcodegen%2Fimpl%2FRuntimeCodeGenerator.xtend;h=00c9f1eb91a14f7f1df97a73bc871cac9e918058;hp=3fef544f8115879aa5dc9df4c7d4ab1306d6ca1a;hb=ebd9aba9e844229de613a2b60b5d21119fcee968;hpb=721677fcf9f9f4085422eb3523e1cf752d698b4d diff --git a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/RuntimeCodeGenerator.xtend b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/RuntimeCodeGenerator.xtend index 3fef544f81..00c9f1eb91 100644 --- a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/RuntimeCodeGenerator.xtend +++ b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/RuntimeCodeGenerator.xtend @@ -16,6 +16,7 @@ import org.opendaylight.yangtools.yang.binding.util.BindingReflections import org.opendaylight.yangtools.yang.binding.util.ClassLoaderUtils import static extension org.opendaylight.controller.sal.binding.codegen.RuntimeCodeSpecification.* +import org.opendaylight.yangtools.yang.binding.RpcService class RuntimeCodeGenerator extends AbstractRuntimeCodeGenerator { @@ -28,7 +29,7 @@ class RuntimeCodeGenerator extends AbstractRuntimeCodeGenerator { val proxyName = iface.directProxyName; val potentialClass = ClassLoaderUtils.tryToLoadClassWithTCCL(proxyName) if(potentialClass != null) { - return potentialClass.newInstance; + return potentialClass.newInstance as RpcService; } val supertype = iface.asCtClass val createdCls = createClass(iface.directProxyName, supertype) [ @@ -53,7 +54,7 @@ class RuntimeCodeGenerator extends AbstractRuntimeCodeGenerator { ''' ] ] - return createdCls.toClass(iface.classLoader).newInstance + return createdCls.toClass(iface.classLoader).newInstance as RpcService ] } @@ -63,7 +64,7 @@ class RuntimeCodeGenerator extends AbstractRuntimeCodeGenerator { val routerName = iface.routerName; val potentialClass = ClassLoaderUtils.tryToLoadClassWithTCCL(routerName) if(potentialClass != null) { - return potentialClass.newInstance; + return potentialClass.newInstance as RpcService; } val targetCls = createClass(iface.routerName, supertype) [ @@ -106,7 +107,7 @@ class RuntimeCodeGenerator extends AbstractRuntimeCodeGenerator { ''' ] ] - return targetCls.toClass(iface.classLoader,iface.protectionDomain).newInstance + return targetCls.toClass(iface.classLoader,iface.protectionDomain).newInstance as RpcService ]; }