Example usage for org.eclipse.jdt.core.dom BooleanLiteral setBooleanValue

List of usage examples for org.eclipse.jdt.core.dom BooleanLiteral setBooleanValue

Introduction

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

Prototype

public void setBooleanValue(boolean value) 

Source Link

Document

Sets the boolean value of this boolean literal node.

Usage

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

License:Open Source License

public BooleanLiteral convert(org.eclipse.jdt.internal.compiler.ast.FalseLiteral expression) {
    final BooleanLiteral literal = new BooleanLiteral(this.ast);
    literal.setBooleanValue(false);
    if (this.resolveBindings) {
        this.recordNodes(literal, expression);
    }/*w  w  w .j ava 2s .co m*/
    literal.setSourceRange(expression.sourceStart, expression.sourceEnd - expression.sourceStart + 1);
    return literal;
}

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

License:Open Source License

public BooleanLiteral convert(org.eclipse.jdt.internal.compiler.ast.TrueLiteral expression) {
    final BooleanLiteral literal = new BooleanLiteral(this.ast);
    literal.setBooleanValue(true);
    if (this.resolveBindings) {
        this.recordNodes(literal, expression);
    }// ww  w  .  j a  v  a 2  s .  c  o m
    literal.setSourceRange(expression.sourceStart, expression.sourceEnd - expression.sourceStart + 1);
    return literal;
}