«ELSEIF EMPTY_TYPE.equals(propRet) || EMPTY_TYPE.equals(propRet.typedefReturnType)»
««« generated empty typedef
return "";
- «ELSEIF propRet instanceof GeneratedTransferObject // Is it a GeneratedTransferObject
- && (propRet as GeneratedTransferObject).typedef // Is it a typedef
- && (propRet as GeneratedTransferObject).baseType instanceof BitsTypeDefinition»
+ «ELSEIF propRet.isBitsType»
««« generated bits typedef
return «JU_ARRAYS.importedName».toString(«field».getValue());
«ELSE»
}
'''
+ private static def isBitsType(Type type) {
+ if (type instanceof GeneratedTransferObject) {
+ return type.typedef && type.baseType instanceof BitsTypeDefinition
+ }
+ return false
+ }
+
private static def Type typedefReturnType(Type type) {
if (!(type instanceof GeneratedTransferObject)) {
return null