Examples of arguments()


Examples of org.eclipse.jdt.core.dom.MethodInvocation.arguments()

         */
        String thePropertyKey = method.getName().toString().substring(3);
        StringLiteral literal = ast.newStringLiteral();
        literal.setLiteralValue(thePropertyKey);
       
        methodInvocation.arguments().add(literal);
       
        /*
         * the return statement
         */
        ReturnStatement returnStatement = ast.newReturnStatement();
View Full Code Here

Examples of org.eclipse.jdt.core.dom.MethodInvocation.arguments()

         * the parameters
         */
        String thePropertyKey = method.getName().toString().substring(3);
        StringLiteral literal = ast.newStringLiteral();
        literal.setLiteralValue(thePropertyKey);
        methodInvocation.arguments().add(literal);
        methodInvocation.arguments().add(paramName.copySubtree(newMethod.getAST(), paramName));
       
        ExpressionStatement expressionStatement = ast.newExpressionStatement(methodInvocation);
        block.statements().add(expressionStatement);
         
View Full Code Here

Examples of org.eclipse.jdt.core.dom.MethodInvocation.arguments()

         */
        String thePropertyKey = method.getName().toString().substring(3);
        StringLiteral literal = ast.newStringLiteral();
        literal.setLiteralValue(thePropertyKey);
        methodInvocation.arguments().add(literal);
        methodInvocation.arguments().add(paramName.copySubtree(newMethod.getAST(), paramName));
       
        ExpressionStatement expressionStatement = ast.newExpressionStatement(methodInvocation);
        block.statements().add(expressionStatement);
         
        newMethod.setBody(block); // add the block to the method
View Full Code Here

Examples of org.eclipse.jdt.core.dom.MethodInvocation.arguments()

        String setCheckpointName = SET_CHECKPOINT_NAME;
        MethodInvocation extraSetCheckpoint = ast.newMethodInvocation();
        extraSetCheckpoint.setExpression(newNode);
        extraSetCheckpoint.setName(ast.newSimpleName(setCheckpointName));
        extraSetCheckpoint.arguments().add(ast.newSimpleName(CHECKPOINT_NAME));

        CastExpression typeCast = ast.newCastExpression();
        typeCast.setExpression(extraSetCheckpoint);
        typeCast.setType(createType(ast, getClassName(type.getName(), state,
                root)));
View Full Code Here

Examples of org.eclipse.jdt.core.dom.MethodInvocation.arguments()

        recordInvocation.setName(ast.newSimpleName("add"));

        // If there are indices, create an integer array of those indices,
        // and add it as an argument.
        if (indices == 0) {
            recordInvocation.arguments().add(ast.newNullLiteral());
        } else {
            ArrayCreation arrayCreation = ast.newArrayCreation();
            ArrayType arrayType = ast.newArrayType(ast
                    .newPrimitiveType(PrimitiveType.INT));
            ArrayInitializer initializer = ast.newArrayInitializer();
View Full Code Here

Examples of org.eclipse.jdt.core.dom.MethodInvocation.arguments()

                initializer.expressions().add(ast.newSimpleName("index" + i));
            }

            arrayCreation.setType(arrayType);
            arrayCreation.setInitializer(initializer);
            recordInvocation.arguments().add(arrayCreation);
        }

        // If there are indices, add them ("index0", "index1", ...) after the
        // field.
        Expression field = ast.newSimpleName(fieldName);
View Full Code Here

Examples of org.eclipse.jdt.core.dom.MethodInvocation.arguments()

                field = arrayAccess;
            }
        }

        // Set the field as the next argument.
        recordInvocation.arguments().add(field);

        // Get current timestamp from the checkpoint object.
        MethodInvocation timestampGetter = ast.newMethodInvocation();
        timestampGetter.setExpression(ast.newSimpleName(CHECKPOINT_NAME));
        timestampGetter.setName(ast.newSimpleName("getTimestamp"));
View Full Code Here

Examples of org.eclipse.jdt.core.dom.MethodInvocation.arguments()

        MethodInvocation backup = ast.newMethodInvocation();
        backup.setExpression(ast.newSimpleName(_getRecordName(fieldName)));
        backup.setName(ast.newSimpleName("backup"));

        if (indices == 0) {
            backup.arguments().add(ast.newNullLiteral());
        } else {
            ArrayCreation arrayCreation = ast.newArrayCreation();
            ArrayType arrayType = ast.newArrayType(ast
                    .newPrimitiveType(PrimitiveType.INT));
            ArrayInitializer initializer = ast.newArrayInitializer();
View Full Code Here

Examples of org.eclipse.jdt.core.dom.MethodInvocation.arguments()

                initializer.expressions().add(ast.newSimpleName("index" + i));
            }

            arrayCreation.setType(arrayType);
            arrayCreation.setInitializer(initializer);
            backup.arguments().add(arrayCreation);
        }

        //If there are indices, add them ("index0", "index1", ...) after the
        // field.
        Expression field = ast.newSimpleName(fieldName);
View Full Code Here

Examples of org.eclipse.jdt.core.dom.MethodInvocation.arguments()

                field = arrayAccess;
            }
        }

        // Set the field as the next argument.
        backup.arguments().add(field);

        // Get current timestamp from the checkpoint object.
        MethodInvocation timestampGetter = ast.newMethodInvocation();
        timestampGetter.setExpression(ast.newSimpleName(CHECKPOINT_NAME));
        timestampGetter.setName(ast.newSimpleName("getTimestamp"));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.