Cache computed fieldName in templates 99/84199/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 4 Sep 2019 14:17:32 +0000 (16:17 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 4 Sep 2019 14:20:58 +0000 (16:20 +0200)
commit72585e1dff2c81af33f547b49694f7c976033bed
treec62125872585a884747475e45ea6985467b1e786
parent44e0faeba93e1ac992130b3b282c46186b13a076
Cache computed fieldName in templates

We end up using the same name multiple times, which really is an
invariant. Cache and reuse the constant, so that we end up with
more efficient code.

Change-Id: I6ee5cc162c43c542a08ba84250f42d9a30ba3f0d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/mdsal-binding-java-api-generator/src/main/java/org/opendaylight/mdsal/binding/java/api/generator/BaseTemplate.xtend
binding/mdsal-binding-java-api-generator/src/main/java/org/opendaylight/mdsal/binding/java/api/generator/ClassTemplate.xtend
binding/mdsal-binding-java-api-generator/src/main/java/org/opendaylight/mdsal/binding/java/api/generator/UnionTemplate.xtend