Example usage for org.eclipse.jdt.core.dom StringLiteral internalSetEscapedValue

List of usage examples for org.eclipse.jdt.core.dom StringLiteral internalSetEscapedValue

Introduction

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

Prototype

void internalSetEscapedValue(String token) 

Source Link

Usage

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

License:Open Source License

public Expression convert(org.eclipse.jdt.internal.compiler.ast.StringLiteral expression) {
    if (expression instanceof StringLiteralConcatenation) {
        return convert((StringLiteralConcatenation) expression);
    }// ww w . j a  va  2  s .  c o m
    int length = expression.sourceEnd - expression.sourceStart + 1;
    int sourceStart = expression.sourceStart;
    StringLiteral literal = new StringLiteral(this.ast);
    if (this.resolveBindings) {
        this.recordNodes(literal, expression);
    }
    literal.internalSetEscapedValue(new String(this.compilationUnitSource, sourceStart, length));
    literal.setSourceRange(expression.sourceStart, expression.sourceEnd - expression.sourceStart + 1);
    return literal;
}