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

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

Introduction

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

Prototype

void internalSetEscapedValue(String value) 

Source Link

Usage

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

License:Open Source License

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