Example usage for org.eclipse.jdt.internal.compiler.ast ASTNode OperatorMASK

List of usage examples for org.eclipse.jdt.internal.compiler.ast ASTNode OperatorMASK

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.ast ASTNode OperatorMASK.

Prototype

int OperatorMASK

To view the source code for org.eclipse.jdt.internal.compiler.ast ASTNode OperatorMASK.

Click Source Link

Usage

From source file:spoon.support.builder.JDTTreeBuilder.java

License:Open Source License

@Override
public boolean visit(BinaryExpression binaryExpression, BlockScope scope) {
    CtBinaryOperator<?> op = factory.Core().createBinaryOperator();
    op.setKind(getBinaryOperatorKind((binaryExpression.bits & ASTNode.OperatorMASK) >> ASTNode.OperatorSHIFT));
    context.enter(op, binaryExpression);
    return true;//from w w  w.j  a  va 2 s. c  om
}

From source file:spoon.support.builder.JDTTreeBuilder.java

License:Open Source License

@Override
public boolean visit(EqualExpression equalExpression, BlockScope scope) {
    CtBinaryOperator<?> op = factory.Core().createBinaryOperator();
    op.setKind(getBinaryOperatorKind((equalExpression.bits & ASTNode.OperatorMASK) >> ASTNode.OperatorSHIFT));
    context.enter(op, equalExpression);// w  w w  .  jav a  2 s .c om
    return true; // do nothing by default, keep traversing
}

From source file:spoon.support.builder.JDTTreeBuilder.java

License:Open Source License

@Override
public boolean visit(OR_OR_Expression or_or_Expression, BlockScope scope) {
    CtBinaryOperator<?> op = factory.Core().createBinaryOperator();
    op.setKind(getBinaryOperatorKind((or_or_Expression.bits & ASTNode.OperatorMASK) >> ASTNode.OperatorSHIFT));
    context.enter(op, or_or_Expression);
    return true;//from ww w  . j  ava 2s.c om
}

From source file:spoon.support.builder.JDTTreeBuilder.java

License:Open Source License

@Override
public boolean visit(UnaryExpression unaryExpression, BlockScope scope) {
    CtUnaryOperator<?> op = factory.Core().createUnaryOperator();
    op.setKind(getUnaryOperator((unaryExpression.bits & ASTNode.OperatorMASK) >> ASTNode.OperatorSHIFT));
    context.enter(op, unaryExpression);//from w  ww . ja  v  a2  s . c o  m
    return true;
}