public static String getReturnType(final ReturnType type) { if ((type instanceof ReturnPrimitiveType)) { PrimitiveType _returnType = ((ReturnPrimitiveType) type).getReturnType(); return _returnType.getName(); } else { if ((type instanceof ReturnObjectType)) { Type _returnType_1 = ((ReturnObjectType) type).getReturnType(); return _returnType_1.getName(); } } return null; }
_builder.newLineIfNotEmpty(); boolean _isMultiplicity = ((ReturnPrimitiveType)returnType).isMultiplicity(); if (_isMultiplicity) { _builder.append("\t"); _builder.append("\t"); _builder.append("\t"); PrimitiveType _returnType_2 = primitiveReturnType.getReturnType(); String _content = OperationResponseValidationTemplate.primitiveTypeValidationTemplate.getContent(_returnType_2, invocationContext); _builder.append(_content, "\t\t"); } else { _builder.append("\t"); PrimitiveType _returnType_3 = primitiveReturnType.getReturnType(); String _content_1 = OperationResponseValidationTemplate.primitiveTypeValidationTemplate.getContent(_returnType_3, invocationContext); _builder.append(_content_1, "\t");
/** * Returns the return type as string */ public static String getReturnTypeAsString(final Operation op) { ReturnType _returnType = op.getReturnType(); boolean _notEquals = (!Objects.equal(_returnType, null)); if (_notEquals) { ReturnType returnType = op.getReturnType(); if ((returnType instanceof ReturnObjectType)) { Type _returnType_1 = ((ReturnObjectType) returnType).getReturnType(); return _returnType_1.getName(); } else { if ((returnType instanceof ReturnPrimitiveType)) { PrimitiveType _returnType_2 = ((ReturnPrimitiveType) returnType).getReturnType(); return _returnType_2.getName(); } } } else { return "void"; } return null; }
/** * Returns the return type as string */ public static String getReturnTypeAsString(final Operation op) { ReturnType _returnType = op.getReturnType(); boolean _notEquals = (!Objects.equal(_returnType, null)); if (_notEquals) { ReturnType returnType = op.getReturnType(); if ((returnType instanceof ReturnObjectType)) { Type _returnType_1 = ((ReturnObjectType) returnType).getReturnType(); return _returnType_1.getName(); } else { if ((returnType instanceof ReturnPrimitiveType)) { PrimitiveType _returnType_2 = ((ReturnPrimitiveType) returnType).getReturnType(); return _returnType_2.getName(); } } } else { return "void"; } return null; }
protected String getResultBaseType(final Operation operation) { boolean _and = false; ReturnType _returnType = operation.getReturnType(); boolean _notEquals = (!Objects.equal(_returnType, null)); if (!_notEquals) { _and = false; } else { ReturnType _returnType_1 = operation.getReturnType(); _and = (_returnType_1 instanceof ReturnPrimitiveType); } if (_and) { ReturnType _returnType_2 = operation.getReturnType(); boolean _isMultiplicity = _returnType_2.isMultiplicity(); boolean _equals = (_isMultiplicity == false); if (_equals) { ReturnType primitiveType = operation.getReturnType(); PrimitiveType _returnType_3 = ((ReturnPrimitiveType) primitiveType).getReturnType(); String typeName = _returnType_3.getLiteral(); return this.getThingWorxDataType(typeName); } else { return "COMPLEX_TYPE"; } } else { return "NOTHING"; } }
_builder.newLineIfNotEmpty(); _builder.append("public "); PrimitiveType _returnType_11 = primitiveType.getReturnType(); String _name_6 = _returnType_11.getName(); _builder.append(_name_6, ""); _builder.newLineIfNotEmpty(); PrimitiveType _returnType_12 = primitiveType.getReturnType(); String _initialValue = ValueMapper.getInitialValue(_returnType_12); boolean _equalsIgnoreCase = _initialValue.equalsIgnoreCase(""); if (_equalsIgnoreCase) { _builder.append("\t"); PrimitiveType _returnType_13 = primitiveType.getReturnType(); String _name_8 = _returnType_13.getName(); _builder.append(_name_8, "\t"); } else { _builder.append("\t"); PrimitiveType _returnType_14 = primitiveType.getReturnType(); String _name_9 = _returnType_14.getName(); _builder.append(_name_9, "\t"); _builder.append(" result = "); PrimitiveType _returnType_15 = primitiveType.getReturnType(); String _initialValue_1 = ValueMapper.getInitialValue(_returnType_15); _builder.append(_initialValue_1, "\t");
_builder.newLineIfNotEmpty(); _builder.append("public "); PrimitiveType _returnType_11 = primitiveType.getReturnType(); String _name_6 = _returnType_11.getName(); _builder.append(_name_6, ""); _builder.newLineIfNotEmpty(); PrimitiveType _returnType_12 = primitiveType.getReturnType(); String _initialValue = ValueMapper.getInitialValue(_returnType_12); boolean _equalsIgnoreCase = _initialValue.equalsIgnoreCase(""); if (_equalsIgnoreCase) { _builder.append("\t"); PrimitiveType _returnType_13 = primitiveType.getReturnType(); String _name_8 = _returnType_13.getName(); _builder.append(_name_8, "\t"); } else { _builder.append("\t"); PrimitiveType _returnType_14 = primitiveType.getReturnType(); String _name_9 = _returnType_14.getName(); _builder.append(_name_9, "\t"); _builder.append(" result = "); PrimitiveType _returnType_15 = primitiveType.getReturnType(); String _initialValue_1 = ValueMapper.getInitialValue(_returnType_15); _builder.append(_initialValue_1, "\t");
_builder.append("\t"); ReturnType _returnType_4 = operation.getReturnType(); PrimitiveType type_1 = ((ReturnPrimitiveType) _returnType_4).getReturnType(); _builder.newLineIfNotEmpty(); _builder.append("\t");
_builder.append("\t"); _builder.append("public "); PrimitiveType _returnType_5 = primitiveType.getReturnType(); String _name_10 = _returnType_5.getName(); _builder.append(_name_10, "\t");
_builder.append("\t"); ReturnType _returnType_4 = operation.getReturnType(); PrimitiveType type_1 = ((ReturnPrimitiveType) _returnType_4).getReturnType(); _builder.newLineIfNotEmpty(); _builder.append("\t");
_builder.append("\t"); _builder.append("public "); PrimitiveType _returnType_5 = primitiveType.getReturnType(); String _name_7 = _returnType_5.getName(); _builder.append(_name_7, "\t");
_builder.append("(value : NSData) -> "); ReturnType _returnType_8 = operation.getReturnType(); PrimitiveType _returnType_9 = ((ReturnPrimitiveType) _returnType_8).getReturnType(); String _mapSimpleDatatype = MappingUtils.mapSimpleDatatype(_returnType_9); _builder.append(_mapSimpleDatatype, " ");
_builder.append("\t"); _builder.append("public "); PrimitiveType _returnType_5 = primitiveType.getReturnType(); String _name_7 = _returnType_5.getName(); _builder.append(_name_7, "\t");
_builder.append("\t"); ReturnType _returnType_4 = operation.getReturnType(); PrimitiveType type_1 = ((ReturnPrimitiveType) _returnType_4).getReturnType(); _builder.newLineIfNotEmpty(); _builder.append("\t");
_builder.append("\t"); _builder.append("public "); PrimitiveType _returnType_5 = primitiveType.getReturnType(); String _name_10 = _returnType_5.getName(); _builder.append(_name_10, "\t");
_builder.append("\t"); ReturnType _returnType_4 = operation.getReturnType(); PrimitiveType type_1 = ((ReturnPrimitiveType) _returnType_4).getReturnType(); _builder.newLineIfNotEmpty(); _builder.append("\t");