X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fsal%2Fyang-prototype%2Fsal%2Fsal-binding-broker-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fbinding%2Fcodegen%2FRuntimeCodeSpecification.xtend;fp=opendaylight%2Fsal%2Fyang-prototype%2Fsal%2Fsal-binding-broker-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fbinding%2Fcodegen%2FRuntimeCodeSpecification.xtend;h=0000000000000000000000000000000000000000;hb=fe024ad74b8656c3ee61b9ddff6009a779aa2189;hp=c6e76c2907730df0a26d369089fa96f345b7cb31;hpb=437c1bdb967072319e81774bdcf570b2fb0f7b89;p=controller.git diff --git a/opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/java/org/opendaylight/controller/sal/binding/codegen/RuntimeCodeSpecification.xtend b/opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/java/org/opendaylight/controller/sal/binding/codegen/RuntimeCodeSpecification.xtend deleted file mode 100644 index c6e76c2907..0000000000 --- a/opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/java/org/opendaylight/controller/sal/binding/codegen/RuntimeCodeSpecification.xtend +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.controller.sal.binding.codegen - -import org.opendaylight.yangtools.yang.binding.RpcService -import org.opendaylight.yangtools.yang.binding.BaseIdentity -import org.opendaylight.yangtools.yang.binding.NotificationListener - -/** - * - * - */ -class RuntimeCodeSpecification { - - public static val PACKAGE_PREFIX = "_gen."; - - public static val DIRECT_PROXY_SUFFIX = "DirectProxy"; - public static val ROUTER_SUFFIX = "Router"; - public static val INVOKER_SUFFIX = "Invoker"; - - public static val DELEGATE_FIELD = "_delegate" - public static val ROUTING_TABLE_FIELD_PREFIX = "_routes_" - - public static def getInvokerName(Class listener) { - getGeneratedName(listener, INVOKER_SUFFIX); - } - - /** - * Returns a name for DirectProxy implementation - * - * - */ - public static def getDirectProxyName(Class base) { - getGeneratedName(base, DIRECT_PROXY_SUFFIX); - } - - /** - * Returns a name for Router implementation - * - */ - public static def getRouterName(Class base) { - getGeneratedName(base, ROUTER_SUFFIX); - } - - /** - * Returns a name for generated interface - * - */ - public static def getGeneratedName(Class cls, String suffix) { - '''«PACKAGE_PREFIX»«cls.package.name».«cls.simpleName»$«suffix»'''.toString() - } - - /** - * Returns a field name for specified routing context - * - */ - public static def getRoutingTableField(Class routingContext) { - return '''_routes_«routingContext.simpleName»'''.toString; - } -}