Esempio n. 1
0
        public OperationCallExp createOperationCallExp(
            OclExpression source,
            CoreOperation operation,
            List <object> arguments,
            CoreClassifier returnType,
            bool isMarkedPre)
        {
            OperationCallExp exp = new OperationCallExpImpl();

            exp.setFactory(this);

            exp.setReferredOperation(operation);
            exp.setType(returnType);
            exp.setSource((isMarkedPre ? createAtPreOperation(source) : source));
            if (arguments != null)
            {
                foreach (OclExpression argument in arguments)
                {
                    ((OclExpressionImpl)argument).setParentOperation(exp);
                    ((OperationCallExpImpl)exp).addArgument(argument);
                }
            }
            ((OclExpressionImpl)source).setAppliedProperty(exp);

            return(exp);
        }
Esempio n. 2
0
        public OperationCallExp createOperationCallExp(
            CoreClassifier returnType,
            OclExpression source,
            String opName,
            List <object> arguments,
            bool isMarkedPre)
        {
            OperationCallExp exp = new OperationCallExpImpl();

            exp.setFactory(this);

            exp.setName(opName);
            exp.setType(returnType);
            exp.setSource((isMarkedPre ? createAtPreOperation(source) : source));
            foreach (OclExpression argument in arguments)
            {
                ((OclExpressionImpl)argument).setParentOperation(exp);
                ((OperationCallExpImpl)exp).addArgument(argument);
            }
            ((OclExpressionImpl)source).setAppliedProperty(exp);

            return(exp);
        }