Package org.eclipse.jdt.core.dom

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


                        ast.newExpressionStatement(popStates));

                // Recall the restore method.
                MethodInvocation recursion = ast.newMethodInvocation();
                recursion.setName(ast.newSimpleName(methodName));
                recursion.arguments().add(ast.newSimpleName("timestamp"));
                recursion.arguments().add(ast.newSimpleName("trim"));
                restoreBlock.statements().add(
                        ast.newExpressionStatement(recursion));

                body.statements().add(restoreCheckpoint);
View Full Code Here


                // Recall the restore method.
                MethodInvocation recursion = ast.newMethodInvocation();
                recursion.setName(ast.newSimpleName(methodName));
                recursion.arguments().add(ast.newSimpleName("timestamp"));
                recursion.arguments().add(ast.newSimpleName("trim"));
                restoreBlock.statements().add(
                        ast.newExpressionStatement(recursion));

                body.statements().add(restoreCheckpoint);
View Full Code Here

        ifStatement.setThenStatement(thenBranch);

        MethodInvocation setCheckpoint = ast.newMethodInvocation();
        setCheckpoint.setExpression(ast.newSimpleName("newValue"));
        setCheckpoint.setName(ast.newSimpleName(SET_CHECKPOINT_NAME));
        setCheckpoint.arguments().add(ast.newSimpleName(CHECKPOINT_NAME));
        thenBranch.statements().add(ast.newExpressionStatement(setCheckpoint));

        return ifStatement;
    }
View Full Code Here

            testNewCheckpoint.setThenStatement(testNewCheckpointBody);

            MethodInvocation record = ast.newMethodInvocation();
            record.setExpression(ast.newSimpleName(CHECKPOINT_RECORD_NAME));
            record.setName(ast.newSimpleName("add"));
            record.arguments().add(ast.newSimpleName(CHECKPOINT_NAME));

            MethodInvocation getTimestamp = ast.newMethodInvocation();
            getTimestamp.setExpression(ast.newSimpleName("checkpoint"));
            getTimestamp.setName(ast.newSimpleName("getTimestamp"));
            record.arguments().add(getTimestamp);
View Full Code Here

            MethodInvocation pushStates = ast.newMethodInvocation();
            String recordType = getClassName(FieldRecord.class, state, root);
            pushStates.setExpression(createName(ast, recordType));
            pushStates.setName(ast.newSimpleName("pushState"));
            pushStates.arguments().add(ast.newSimpleName(RECORDS_NAME));
            testNewCheckpointBody.statements().add(
                    ast.newExpressionStatement(pushStates));
            thenBranch.statements().add(testNewCheckpoint);

            // Assign the new checkpoint.
View Full Code Here

            // Propagate the change to other objects monitored by the same old
            // checkpoint.
            MethodInvocation propagate = ast.newMethodInvocation();
            propagate.setExpression(ast.newSimpleName("oldCheckpoint"));
            propagate.setName(ast.newSimpleName("setCheckpoint"));
            propagate.arguments().add(ast.newSimpleName("checkpoint"));
            thenBranch.statements().add(ast.newExpressionStatement(propagate));

            // Add this object to the list in the checkpoint.
            MethodInvocation addInvocation = ast.newMethodInvocation();
            addInvocation.setExpression(ast.newSimpleName("checkpoint"));
View Full Code Here

            // Add this object to the list in the checkpoint.
            MethodInvocation addInvocation = ast.newMethodInvocation();
            addInvocation.setExpression(ast.newSimpleName("checkpoint"));
            addInvocation.setName(ast.newSimpleName("addObject"));
            addInvocation.arguments().add(
                    _createRollbackableObject(ast, isAnonymous));
            thenBranch.statements().add(
                    ast.newExpressionStatement(addInvocation));

            // Return this object.
View Full Code Here

            backup.setName(newName);

            // If the field is static, add the checkpoint object as the first
            // argument.
            if (isStatic) {
                backup.arguments().add(ast.newSimpleName(CHECKPOINT_NAME));
            }

            // Add all the indices into the argument list.
            backup.arguments().addAll(indices);
View Full Code Here

            if (isStatic) {
                backup.arguments().add(ast.newSimpleName(CHECKPOINT_NAME));
            }

            // Add all the indices into the argument list.
            backup.arguments().addAll(indices);

            replaceNode(node, backup);

            _recordField(_backupFields, owner.getName(), name.getIdentifier(),
                    nIndices);
View Full Code Here

        invocation.setName(newName);

        // If the field is static, add the checkpoint object as the first
        // argument.
        if (isStatic) {
            invocation.arguments().add(ast.newSimpleName(CHECKPOINT_NAME));
        }

        // Add an operator, if necessary.
        Type type = Type.getType(node);
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.