Package org.eclipse.jdt.core.dom

Examples of org.eclipse.jdt.core.dom.BooleanLiteral


  public IResult<TupleLatticeElement<Variable, BooleanConstantLE>> transfer(
      LoadLiteralInstruction instr, List<ILabel> labels,
      TupleLatticeElement<Variable, BooleanConstantLE> value) {
    if (instr.getNode() instanceof BooleanLiteral) {
      BooleanLiteral boolNode = (BooleanLiteral)instr.getNode();
     
      if (labels.contains(BooleanLabel.getBooleanLabel(true)) && labels.contains(BooleanLabel.getBooleanLabel(false)))
      {
        TupleLatticeElement<Variable, BooleanConstantLE> tVal, fVal;
        LabeledResult<TupleLatticeElement<Variable, BooleanConstantLE>> result = LabeledResult.createResult(value);
       
        tVal = ops.copy(value);
        fVal = ops.copy(value);
       
        tVal.put(instr.getTarget(), boolNode.booleanValue() ? BooleanConstantLE.TRUE : BooleanConstantLE.BOTTOM);
        fVal.put(instr.getTarget(), !boolNode.booleanValue() ? BooleanConstantLE.FALSE : BooleanConstantLE.BOTTOM);
        value.put(instr.getTarget(), boolNode.booleanValue() ? BooleanConstantLE.TRUE : BooleanConstantLE.FALSE);
       
        result.put(BooleanLabel.getBooleanLabel(true), tVal);
        result.put(BooleanLabel.getBooleanLabel(false), fVal);
        return result;       
      }
      else
        value.put(instr.getTarget(), boolNode.booleanValue() ? BooleanConstantLE.TRUE : BooleanConstantLE.FALSE);
    }
   
    return LabeledSingleResult.createResult(value, labels);
  }
View Full Code Here


        NumberLiteral numberLiteral = ast.newNumberLiteral();
        numberLiteral.setToken(String.valueOf(
            valueSpecification.integerValue()).concat("L"));
        ec.arguments().add(numberLiteral);
      } else if (type.getName().equalsIgnoreCase("Boolean")) {
        BooleanLiteral booleanLiteral = ast
            .newBooleanLiteral(valueSpecification.booleanValue());
        ec.arguments().add(booleanLiteral);
      } else if (type.getName().equalsIgnoreCase("String")) {
        StringLiteral stringLiteral = ast.newStringLiteral();
        stringLiteral.setLiteralValue(valueSpecification.stringValue());
View Full Code Here

    stringLiteral.setLiteralValue(literalValue);
    return stringLiteral;
  }
 
  public static BooleanLiteral newBooleanLiteral(AST ast, boolean booleanValue) {
    BooleanLiteral booleanLiteral = ast.newBooleanLiteral(booleanValue);
    return booleanLiteral;
  }
View Full Code Here

//      case ASTNode.ASSIGNMENT:
//        return "Assignment";
//      case ASTNode.BLOCK:
//        return "Block";
      case ASTNode.BOOLEAN_LITERAL:
        BooleanLiteral booleanLiteral = (BooleanLiteral) node;
        return booleanLiteral.booleanValue();
//      case ASTNode.BREAK_STATEMENT:
//        return "Break statement";
//      case ASTNode.CAST_EXPRESSION:
//        return "Cast expression";
//      case ASTNode.CATCH_CLAUSE:
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.dom.BooleanLiteral

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.