Examples of newCastExpression()


Examples of org.eclipse.jdt.core.dom.AST.newCastExpression()

        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)));
        replaceNode(node, typeCast);
    }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.AST.newCastExpression()

        // Add the right-hand side expression to the argument list.
        Type rightHandType = Type.getType(rightHand);

        if (!isSpecial && type.isPrimitive() && !type.equals(rightHandType)) {
            // Require an explicit conversion.
            CastExpression castExpression = ast.newCastExpression();
            castExpression.setType(createType(ast, type.getName()));
            castExpression.setExpression((Expression) ASTNode.copySubtree(ast,
                    rightHand));
            rightHand = castExpression;
        } else {
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.