List of usage examples for org.eclipse.jdt.internal.compiler.ast StringLiteralConcatenation computeConstant
public void computeConstant()
From source file:org.eclipse.jdt.core.dom.ASTConverter.java
License:Open Source License
public InfixExpression convert(StringLiteralConcatenation expression) { expression.computeConstant(); final InfixExpression infixExpression = new InfixExpression(this.ast); infixExpression.setOperator(InfixExpression.Operator.PLUS); org.eclipse.jdt.internal.compiler.ast.Expression[] stringLiterals = expression.literals; infixExpression.setLeftOperand(convert(stringLiterals[0])); infixExpression.setRightOperand(convert(stringLiterals[1])); for (int i = 2; i < expression.counter; i++) { infixExpression.extendedOperands().add(convert(stringLiterals[i])); }/*from w ww . j ava 2s.c o m*/ if (this.resolveBindings) { this.recordNodes(infixExpression, expression); } infixExpression.setSourceRange(expression.sourceStart, expression.sourceEnd - expression.sourceStart + 1); return infixExpression; }