<geminiweb.version>2.2.0.RELEASE</geminiweb.version>
<checkstyle.version>2.10</checkstyle.version>
<testvm.argLine>-Xmx1024m -XX:MaxPermSize=256m</testvm.argLine>
+ <yang.version>0.5.7-SNAPSHOT</yang.version>
+ <guava.version>14.0.1</guava.version>
+ <ietf-inet-types.version>2010.09.24-SNAPSHOT</ietf-inet-types.version>
+ <ietf-yang-types.version>2010.09.24-SNAPSHOT</ietf-yang-types.version>
+ <yang-ext.version>2013.09.07-SNAPSHOT</yang-ext.version>
+ <javassist.version>3.17.1-GA</javassist.version>
+ <sample-toaster.version>1.0-SNAPSHOT</sample-toaster.version>
</properties>
<pluginRepositories>
<artifactId>jersey-json</artifactId>
<version>${jersey.version}</version>
</dependency>
+
+ <!-- yangtools -->
+
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-binding</artifactId>
+ <version>${yang.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-common</artifactId>
+ <version>${yang.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-data-api</artifactId>
+ <version>${yang.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-model-api</artifactId>
+ <version>${yang.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-data-util</artifactId>
+ <version>${yang.version}</version>
+ </dependency>
+
+ <!-- Models -->
+
+ <dependency>
+ <groupId>org.opendaylight.yangtools.model</groupId>
+ <artifactId>ietf-inet-types</artifactId>
+ <version>${ietf-inet-types.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools.model</groupId>
+ <artifactId>ietf-yang-types</artifactId>
+ <version>${ietf-yang-types.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-ext</artifactId>
+ <version>${yang-ext.version}</version>
+ </dependency>
+
+ <!-- Other MDSAL dependencies -->
+
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <version>${guava.version}</version>
+ <type>jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <version>${javassist.version}</version>
+ </dependency>
</dependencies>
</project>
<prerequisites>
<maven>3.0</maven>
</prerequisites>
-
<scm>
- <connection>scm:git:https://git.opendaylight.org/gerrit/p/controller.git</connection>
+ <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>
<developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
+ <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:Main</url>
</scm>
<parent>
<groupId>org.opendaylight.controller</groupId>
<module>../../../third-party/openflowj</module>
<module>../../../third-party/net.sf.jung2</module>
<module>../../../third-party/jersey-servlet</module>
+ <module>../../../third-party/commons/thirdparty</module>
<!-- SAL bundles -->
<module>../../sal/api</module>
<module>../../sal/networkconfiguration/api</module>
<module>../../sal/networkconfiguration/implementation</module>
+ <!-- MD-SAL bundles -->
+ <module>../../sal/yang-prototype</module>
+
<!-- Web bundles -->
<module>../../web/root</module>
<module>../../web/flows</module>
<module>../../samples/simpleforwarding</module>
<module>../../samples/loadbalancer</module>
<module>../../samples/northbound/loadbalancer</module>
+
+ <!-- Parents -->
<module>../../commons/concepts</module>
<module>../../commons/integrationtest</module>
<module>../../commons/checkstyle</module>
<module>../../commons/opendaylight</module>
+ <module>../../commons/parent</module>
</modules>
<build>
package org.opendaylight.controller.sal.binding.impl.utils
import javassist.ClassPool
+import javassist.NotFoundException
+import javassist.LoaderClassPath
class GeneratorUtils {
public static def generatedName(Class<?> cls, String suffix) {
'''«PREFIX»«cls.package.name».«cls.simpleName»$«suffix»'''.toString()
}
-
- public static def get(ClassPool pool,Class<?> cls) {
- pool.get(cls.name);
+
+ public static def get(ClassPool pool, Class<?> cls) {
+ try {
+ return pool.get(cls.name)
+ } catch (NotFoundException e) {
+ pool.appendClassPath(new LoaderClassPath(cls.classLoader));
+ return pool.get(cls.name)
+ }
}
}