Example usage for org.eclipse.jdt.core.dom CastExpression CastExpression

List of usage examples for org.eclipse.jdt.core.dom CastExpression CastExpression

Introduction

In this page you can find the example usage for org.eclipse.jdt.core.dom CastExpression CastExpression.

Prototype

CastExpression(AST ast) 

Source Link

Document

Creates a new AST node for a cast expression owned by the given AST.

Usage

From source file:org.eclipse.jdt.core.dom.ASTConverter.java

License:Open Source License

public CastExpression convert(org.eclipse.jdt.internal.compiler.ast.CastExpression expression) {
    CastExpression castExpression = new CastExpression(this.ast);
    castExpression.setSourceRange(expression.sourceStart, expression.sourceEnd - expression.sourceStart + 1);
    TypeReference type = expression.type;
    trimWhiteSpacesAndComments(type);/*w ww  .java2s.  com*/
    castExpression.setType(convertType(type));
    castExpression.setExpression(convert(expression.expression));
    if (this.resolveBindings) {
        recordNodes(castExpression, expression);
    }
    return castExpression;
}