Package org.andromda.translation.ocl.node

Examples of org.andromda.translation.ocl.node.AActualParameterList


        if (callParameters != null)
        {
            PActualParameterList parameterList = ((AFeatureCallParameters)callParameters).getActualParameterList();
            if (parameterList != null)
            {
                AActualParameterList params = (AActualParameterList)parameterList;

                // add the first param if it exists
                String firstParam = TranslationUtils.trimToEmpty(params.getExpression());
                if (StringUtils.isNotEmpty(firstParam))
                {
                    parameters.add(firstParam);
                }

                // now add the rest of the params which are contained in the
                // tail
                List restOfParams = params.getCommaExpression();
                if (restOfParams != null && !restOfParams.isEmpty())
                {
                    Iterator paramIt = restOfParams.iterator();
                    while (paramIt.hasNext())
                    {
View Full Code Here


            AEqualExpression equalExpression = new AEqualExpression(featureCallParameterOption1.getEqual(),
                    featureCallParameterOption1.getExpression());
            iteratorDeclarator.setEqualExpression(equalExpression);
            iteratorDeclarator.setBar(featureCallParameterOption2.getBar());
            AActualParameterList params = new AActualParameterList(featureCallParameterOption2.getExpression(),
                    new ArrayList());
            return new AFeatureCallParameters(featureCallParameters.getLParen(), iteratorDeclarator, params,
                    featureCallParameters.getRParen());
        }
View Full Code Here

            ABarFeatureCallParameterOption barParameterType = (ABarFeatureCallParameterOption)parameterOptions[parameterOptionNum -
                    1];

            AStandardDeclarator standardDeclarator = new AStandardDeclarator(
                    this.getVariableDeclarationList(featureCallParameters), barParameterType.getBar());
            AActualParameterList params = new AActualParameterList(barParameterType.getExpression(), new ArrayList());
            return new AFeatureCallParameters(featureCallParameters.getLParen(), standardDeclarator, params,
                    featureCallParameters.getRParen());
        }
View Full Code Here

                        commaOption.getExpression());
                paramList.add(commaExpression);
            }

            return new AFeatureCallParameters(featureCallParameters.getLParen(), null,
                    new AActualParameterList(expr, paramList), featureCallParameters.getRParen());
        }
View Full Code Here

     * @param featureCall the <strong>arrow</strong> <code>featureCall</code> to handle.
     */
    public void handleArrowFeatureCall(AFeatureCall featureCall)
    {
        AFeatureCallParameters params = (AFeatureCallParameters)featureCall.getFeatureCallParameters();
        AActualParameterList list = null;
        if (params != null)
        {
            list = (AActualParameterList)params.getActualParameterList();
        }
        boolean arrow = this.arrowPropertyCallStack.peek().equals(Boolean.TRUE) &&
                !String.valueOf(list).trim().equals("");
        {
            newTranslationLayer();
            final String navigationalPath = ConcreteSyntaxUtils.getArrowFeatureCallResultNavigationalPath(
                    (APropertyCallExpression)featureCall.parent().parent());
            // if the result of an arrow feature (collection operation) has a
            // navigational
            // path, retrieve it and wrap the current expression with an OCL
            // introspector call
            boolean resultNavigationalPath = StringUtils.isNotBlank(navigationalPath);
            if (resultNavigationalPath)
            {
                write(OCL_INTROSPECTOR_INVOKE_PREFIX);
            }
            write(OCL_TRANSLATOR_PACKAGE);
            write(".OCLCollections.");
            inAFeatureCall(featureCall);
            if (featureCall.getPathName() != null)
            {
                featureCall.getPathName().apply(this);
            }
            String featureCallName = TranslationUtils.trimToEmpty(featureCall.getPathName());
            AFeatureCallParameters parameters = (AFeatureCallParameters)featureCall.getFeatureCallParameters();
            if (parameters != null)
            {
                if (parameters.getLParen() != null)
                {
                    parameters.getLParen().apply(this);
                }
                mergeTranslationLayerBefore();
                AActualParameterList parameterList = (AActualParameterList)parameters.getActualParameterList();
                if (parameterList != null)
                {
                    List expressions = parameterList.getCommaExpression();
   
                    if (parameterList.getExpression() != null)
                    {
                        if (arrow)
                        {
                            write(",");
                            write(features.getProperty(featureCallName));
                            write(" ");
                            if (OCLPredicateFeatures.isPredicateFeature(featureCallName))
                            {
                                write(BOOLEAN_WRAP_PREFIX);
                            }
                        }
                        parameterList.getExpression().apply(this);
                    }
                    for (int ctr = 0; ctr < expressions.size(); ctr++)
                    {
                        Node expression = (Node)expressions.get(ctr);
                        if (expression != null)
                        {
                            write(",");
                            expression.apply(this);
                        }
                    }
                    if (parameterList.getExpression() != null)
                    {
                        if (OCLPredicateFeatures.isPredicateFeature(featureCallName))
                        {
                            write(BOOLEAN_WRAP_SUFFIX);
                        }
View Full Code Here

TOP

Related Classes of org.andromda.translation.ocl.node.AActualParameterList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.