@Override public Parameter getReturnResult() { return this.operation.getReturnResult(); }
/** * Get the first UML2 ReturnResult parameter. Not implemented for UML1.4 * @return ReturnResult parameter */ @Override public ParameterFacade handleGetReturnParameter() { return (ParameterFacade)this.shieldedElement(this.metaObject.getReturnResult()); }
/** * Get the first UML2 ReturnResult parameter. Not implemented for UML1.4 * @return ReturnResult parameter */ @Override public ParameterFacade handleGetReturnParameter() { return (ParameterFacade)this.shieldedElement(this.metaObject.getReturnResult()); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * If this operation has a return parameter, upper equals the value of upper for that parameter. Otherwise upper is not defined. * result = if returnResult()->notEmpty() then returnResult()->any().upper else Set{} endif * @param operation The receiving '<em><b>Operation</b></em>' model object. * <!-- end-model-doc --> * @generated NOT */ public static int upperBound(Operation operation) { Parameter returnResult = operation.getReturnResult(); return returnResult != null ? returnResult.upperBound() : 1; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * If this operation has a return parameter, isUnique equals the value of isUnique for that parameter. Otherwise isUnique is true. * result = if returnResult()->notEmpty() then returnResult()->any().isUnique else true endif * @param operation The receiving '<em><b>Operation</b></em>' model object. * <!-- end-model-doc --> * @generated NOT */ public static boolean isUnique(Operation operation) { Parameter returnResult = operation.getReturnResult(); return returnResult != null ? returnResult.isUnique() : true; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * If this operation has a return parameter, isOrdered equals the value of isOrdered for that parameter. Otherwise isOrdered is false. * result = if returnResult()->notEmpty() then returnResult()->any().isOrdered else false endif * @param operation The receiving '<em><b>Operation</b></em>' model object. * <!-- end-model-doc --> * @generated NOT */ public static boolean isOrdered(Operation operation) { Parameter returnResult = operation.getReturnResult(); return returnResult != null ? returnResult.isOrdered() : false; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * If this operation has a return parameter, lower equals the value of lower for that parameter. Otherwise lower is not defined. * result = if returnResult()->notEmpty() then returnResult()->any().lower else Set{} endif * @param operation The receiving '<em><b>Operation</b></em>' model object. * <!-- end-model-doc --> * @generated NOT */ public static int lowerBound(Operation operation) { Parameter returnResult = operation.getReturnResult(); return returnResult != null ? returnResult.lowerBound() : 1; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * If this operation has a return parameter, type equals the value of type for that parameter. Otherwise type is not defined. * result = if returnResult()->notEmpty() then returnResult()->any().type else Set{} endif * @param operation The receiving '<em><b>Operation</b></em>' model object. * <!-- end-model-doc --> * @generated NOT */ public static Type getType(Operation operation) { Parameter returnResult = operation.getReturnResult(); return returnResult != null ? (Type) returnResult.eGet(UMLPackage.Literals.TYPED_ELEMENT__TYPE, false) : null; }
/** * @see org.andromda.metafacades.uml.OperationFacade#getParameters() */ @Override protected Collection<Parameter> handleGetParameters() { final Collection<Parameter> params = new ArrayList<Parameter>(this.metaObject.getOwnedParameters()); params.add(this.metaObject.getReturnResult()); CollectionUtils.filter( params, new Predicate() { public boolean evaluate(final Object object) { return object != null && !((Parameter)object).isException(); } }); return params; }
/** * @see org.andromda.metafacades.uml.OperationFacade#getParameters() */ @Override protected Collection<Parameter> handleGetParameters() { final Collection<Parameter> params = new ArrayList<Parameter>(this.metaObject.getOwnedParameters()); params.add(this.metaObject.getReturnResult()); CollectionUtils.filter( params, new Predicate() { public boolean evaluate(final Object object) { return object != null && !((Parameter)object).isException(); } }); return params; }
@Override public Object caseOperation(Operation operation) { Parameter returnResult = operation.getReturnResult(); if (returnResult != null) { returnResult.destroy(); } return super.caseOperation(operation); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public static void setIsOrdered(Operation operation, boolean newIsOrdered) { Parameter returnResult = operation.getReturnResult(); if (returnResult == null) { returnResult = operation.createOwnedParameter(null, null); returnResult.setDirection(ParameterDirectionKind.RETURN_LITERAL); } returnResult.setIsOrdered(newIsOrdered); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public static void setUpper(Operation operation, int newUpper) { Parameter returnResult = operation.getReturnResult(); if (returnResult == null) { returnResult = operation.createOwnedParameter(null, null); returnResult.setDirection(ParameterDirectionKind.RETURN_LITERAL); } returnResult.setUpper(newUpper); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public static void setIsUnique(Operation operation, boolean newIsUnique) { Parameter returnResult = operation.getReturnResult(); if (returnResult == null) { returnResult = operation.createOwnedParameter(null, null); returnResult.setDirection(ParameterDirectionKind.RETURN_LITERAL); } returnResult.setIsUnique(newIsUnique); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public static void setLower(Operation operation, int newLower) { Parameter returnResult = operation.getReturnResult(); if (returnResult == null) { returnResult = operation.createOwnedParameter(null, null); returnResult.setDirection(ParameterDirectionKind.RETURN_LITERAL); } returnResult.setLower(newLower); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public static void setType(Operation operation, Type newType) { Parameter returnResult = operation.getReturnResult(); if (returnResult == null) { returnResult = operation.createOwnedParameter(null, null); returnResult.setDirection(ParameterDirectionKind.RETURN_LITERAL); } returnResult.setType(newType); }
Parameter returnResult = oper.getReturnResult(); if (returnResult!=null) { sb.append(" : ");
/** * Obtains the collection kind appropriate for representing the values of * the specified feature. * * @param feature * a feature * * @return the collection kind appropriate to the multiplicity, orderedness, * and uniqueness of the feature, or <code>null</code> if it is * not many */ private static CollectionKind getCollectionKind(Feature feature) { MultiplicityElement element = null; if (feature instanceof MultiplicityElement) { element = (MultiplicityElement) feature; } else if (feature instanceof Operation) { element = ((Operation) feature).getReturnResult(); } if (element != null) { return element.isMultivalued() ? CollectionKind.getKind(element .isOrdered(), element.isUnique()) : null; } return null; // void operation is implicitly scalar }