Package org.andromda.translation.ocl.node

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


         */
        protected AFeatureCallParameters getParametersWithIterateDeclarator(
                AConcreteFeatureCallParameters featureCallParameters, PExpression expression,
                PFeatureCallParameterOption[] parameterOption)
        {
            AIterateDeclarator iteratorDeclarator = new AIterateDeclarator();

            AColonFeatureCallParameterOption featureCallParameterOption0 = (AColonFeatureCallParameterOption)parameterOption[0];
            AIterateFeatureCallParameterOption featureCallParameterOption1 = (AIterateFeatureCallParameterOption)parameterOption[1];
            ABarFeatureCallParameterOption featureCallParameterOption2 = (ABarFeatureCallParameterOption)parameterOption[2];

            AVariableDeclaration iterator = new AVariableDeclaration(getName(expression),
                    featureCallParameterOption0.getTypeDeclaration());
            iteratorDeclarator.setIterator(iterator);
            iteratorDeclarator.setSemicolon(featureCallParameterOption1.getSemicolon());

            AVariableDeclaration accumulator = new AVariableDeclaration(featureCallParameterOption1.getName(),
                    featureCallParameterOption1.getTypeDeclaration());
            iteratorDeclarator.setAccumulator(accumulator);

            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

TOP

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

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.