use of org.sonar.java.model.expression.TypeCastExpressionTreeImpl in project sonar-java by SonarSource.
the class TreeFactory method newClassCastExpression.
public TypeCastExpressionTreeImpl newClassCastExpression(TypeTree type, Optional<Tuple<InternalSyntaxToken, BoundListTreeImpl>> classTypes, InternalSyntaxToken closeParenToken, ExpressionTree expression) {
BoundListTreeImpl bounds = BoundListTreeImpl.emptyList();
InternalSyntaxToken andToken = null;
if (classTypes.isPresent()) {
andToken = classTypes.get().first();
bounds = classTypes.get().second();
}
return new TypeCastExpressionTreeImpl(type, andToken, bounds, closeParenToken, expression);
}
Aggregations