Rather than bouncing through .importedName().contains("[]"), we
can make this check through .name().endsWith("[]"), which prevents
a round-trip to import mechanics and is potentially faster.
Change-Id: I4a939333c294ffa94ac1c013a8e3cee466e32cb9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
35400adb8f5c7db3320fdf6fbcbadf377569c2e0)
'''
public «field.returnType.importedName» «field.getterMethodName»() {
«val fieldName = field.fieldName»
- «IF field.returnType.importedName.contains("[]")»
+ «IF field.returnType.name.endsWith("[]")»
return «fieldName» == null ? null : «fieldName».clone();
«ELSE»
return «fieldName»;
«FOR p : properties»
«val fieldName = p.fieldName»
- «IF p.returnType.importedName.contains("[]")»
+ «IF p.returnType.name.endsWith("[]")»
«IF genTO.typedef && allProperties.size == 1 && allProperties.get(0).name.equals("value")»
this.«fieldName» = «fieldName».clone();
«ELSE»
«ENDIF»
«FOR p : properties»
«val fieldName = p.fieldName»
- «IF p.returnType.importedName.contains("[]")»
+ «IF p.returnType.name.endsWith("[]")»
this.«fieldName» = source.«fieldName» == null ? null : source.«fieldName».clone();
«ELSE»
this.«fieldName» = source.«fieldName»;