/** * Returns the name of the return type or 'returnValue' as string */ public static String getReturnNameAsString(final ReturnType returnType) { if ((returnType instanceof ReturnObjectType)) { Type _returnType = ((ReturnObjectType) returnType).getReturnType(); String _name = _returnType.getName(); return StringExtensions.toFirstLower(_name); } else { if ((returnType instanceof ReturnPrimitiveType)) { return "returnValue"; } } return null; }
_builder.newLineIfNotEmpty(); Type _returnType_4 = returnObjectType.getReturnType(); if ((_returnType_4 instanceof Entity)) { _builder.append("\t"); Type _returnType_5 = returnObjectType.getReturnType(); final Entity entity = ((Entity) _returnType_5); _builder.newLineIfNotEmpty(); boolean _isMultiplicity_1 = returnObjectType.isMultiplicity(); if (_isMultiplicity_1) { _builder.append("\t"); Type _returnType_6 = returnObjectType.getReturnType(); if ((_returnType_6 instanceof org.eclipse.vorto.core.api.model.datatype.Enum)) { _builder.append("\t"); Type _returnType_7 = returnObjectType.getReturnType(); final org.eclipse.vorto.core.api.model.datatype.Enum enum_ = ((org.eclipse.vorto.core.api.model.datatype.Enum) _returnType_7); _builder.newLineIfNotEmpty(); boolean _isMultiplicity_2 = returnObjectType.isMultiplicity(); if (_isMultiplicity_2) { _builder.append("\t");
/** * Returns the name of the return type or 'returnValue' as string */ public static String getReturnNameAsString(final ReturnType returnType) { if ((returnType instanceof ReturnObjectType)) { Type _returnType = ((ReturnObjectType) returnType).getReturnType(); String _name = _returnType.getName(); return StringExtensions.toFirstLower(_name); } else { if ((returnType instanceof ReturnPrimitiveType)) { return "returnValue"; } } return null; }
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; }
/** * 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; }
private static Set<Type> getTypes(FunctionblockModel model) { Set<Type> allTypes = new LinkedHashSet<>(); TreeIterator<EObject> iterator = model.eAllContents(); while(iterator.hasNext()) { EObject current = iterator.next(); if (current instanceof RefParam) { addTypeAndReferences(((RefParam)current).getType(),allTypes); } else if (current instanceof ReturnObjectType) { addTypeAndReferences(((ReturnObjectType)current).getReturnType(),allTypes); } else if (current instanceof ObjectPropertyType) { addTypeAndReferences(((ObjectPropertyType)current).getType(),allTypes); } } return allTypes; }
if ((_returnType instanceof ReturnObjectType)) { ReturnType _returnType_1 = op.getReturnType(); Type _returnType_2 = ((ReturnObjectType) _returnType_1).getReturnType(); EList<Type> _referencedTypes_3 = Utils.getReferencedTypes(_returnType_2); types.addAll(_referencedTypes_3);
_builder.newLineIfNotEmpty(); _builder.append("public "); Type _returnType_2 = objectType.getReturnType(); String _name = _returnType_2.getName(); _builder.append(_name, ""); Type _returnType_3 = objectType.getReturnType(); if ((_returnType_3 instanceof Entity)) { _builder.append("\t"); Type _returnType_4 = objectType.getReturnType(); String _name_2 = _returnType_4.getName(); _builder.append(_name_2, "\t"); _builder.append(" result = new "); Type _returnType_5 = objectType.getReturnType(); String _name_3 = _returnType_5.getName(); _builder.append(_name_3, "\t"); _builder.newLine(); } else { Type _returnType_6 = objectType.getReturnType(); if ((_returnType_6 instanceof org.eclipse.vorto.core.api.model.datatype.Enum)) { _builder.append("\t"); _builder.append("\t"); _builder.append("return "); Type _returnType_7 = objectType.getReturnType(); String _name_4 = _returnType_7.getName(); _builder.append(_name_4, "\t"); _builder.append(".");
_builder.newLineIfNotEmpty(); _builder.append("public "); Type _returnType_2 = objectType.getReturnType(); String _name = _returnType_2.getName(); _builder.append(_name, ""); Type _returnType_3 = objectType.getReturnType(); if ((_returnType_3 instanceof Entity)) { _builder.append("\t"); Type _returnType_4 = objectType.getReturnType(); String _name_2 = _returnType_4.getName(); _builder.append(_name_2, "\t"); _builder.append(" result = new "); Type _returnType_5 = objectType.getReturnType(); String _name_3 = _returnType_5.getName(); _builder.append(_name_3, "\t"); _builder.newLine(); } else { Type _returnType_6 = objectType.getReturnType(); if ((_returnType_6 instanceof org.eclipse.vorto.core.api.model.datatype.Enum)) { _builder.append("\t"); _builder.append("\t"); _builder.append("return "); Type _returnType_7 = objectType.getReturnType(); String _name_4 = _returnType_7.getName(); _builder.append(_name_4, "\t"); _builder.append(".");
_builder.append("\t"); ReturnType _returnType_2 = operation.getReturnType(); Type type = ((ReturnObjectType) _returnType_2).getReturnType(); _builder.newLineIfNotEmpty();
_builder.append("\t"); _builder.append("public "); Type _returnType_2 = objectType.getReturnType(); String _name_8 = _returnType_2.getName(); _builder.append(_name_8, "\t");
_builder.append("\t"); ReturnType _returnType_2 = operation.getReturnType(); Type type = ((ReturnObjectType) _returnType_2).getReturnType(); _builder.newLineIfNotEmpty();
_builder.append("(value : NSData) -> "); ReturnType _returnType_2 = operation.getReturnType(); Type _returnType_3 = ((ReturnObjectType) _returnType_2).getReturnType(); String _name_14 = _returnType_3.getName(); _builder.append(_name_14, " "); _builder.append("var result = "); ReturnType _returnType_4 = operation.getReturnType(); Type _returnType_5 = ((ReturnObjectType) _returnType_4).getReturnType(); String _name_15 = _returnType_5.getName(); _builder.append(_name_15, " \t");
_builder.append("\t"); _builder.append("public "); Type _returnType_2 = objectType.getReturnType(); String _name_5 = _returnType_2.getName(); _builder.append(_name_5, "\t");
_builder.append("\t"); _builder.append("public "); Type _returnType_2 = objectType.getReturnType(); String _name_5 = _returnType_2.getName(); _builder.append(_name_5, "\t");
_builder.append("\t"); _builder.append("public "); Type _returnType_2 = objectType.getReturnType(); String _name_8 = _returnType_2.getName(); _builder.append(_name_8, "\t");
_builder.append("\t"); ReturnType _returnType_2 = operation.getReturnType(); Type type = ((ReturnObjectType) _returnType_2).getReturnType(); _builder.newLineIfNotEmpty();
_builder.append("\t"); ReturnType _returnType_2 = operation.getReturnType(); Type type = ((ReturnObjectType) _returnType_2).getReturnType(); _builder.newLineIfNotEmpty();