Examples of BooleanLiteral


Examples of org.datanucleus.store.rdbms.sql.expression.BooleanLiteral

        if (expr instanceof ArrayLiteral)
        {
            Object arr = ((ArrayLiteral)expr).getValue();
            boolean isEmpty = (arr == null || Array.getLength(arr) == 0);
            JavaTypeMapping m = exprFactory.getMappingForType(boolean.class, false);
            return new BooleanLiteral(stmt, m, isEmpty ? Boolean.TRUE : Boolean.FALSE);
        }
        else
        {
            SQLExpression sizeExpr = exprFactory.invokeMethod(stmt, "ARRAY", "size", expr, args);
            JavaTypeMapping mapping = exprFactory.getMappingForType(Integer.class, true);
View Full Code Here

Examples of org.eclipse.dltk.ast.expressions.BooleanLiteral

  }

  public static BooleanLiteral createSimpleBooleanExpression(Token bToken) {
    int bounds[] = getBounds(bToken);
    boolean value = Boolean.valueOf(bToken.getText());
    return new BooleanLiteral(bounds[0], bounds[1], value);
  }
View Full Code Here

Examples of org.eclipse.dltk.ast.expressions.BooleanLiteral

  }

  public static BooleanLiteral createSimpleBooleanExpression(Token bToken) {
    int bounds[] = getBounds(bToken);
    boolean value = Boolean.valueOf(bToken.getText());
    return new BooleanLiteral(bounds[0], bounds[1], value);
  }
View Full Code Here

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

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

        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

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

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

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

//      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

Examples of org.elegant.aash.comparator.parsing.expr.literal.BooleanLiteral

          return new DoubleLiteral(dValue);
        } else {
          DottedExpression dotted = parseDottedExpression(stream);
          if (dotted.getIndex() == null && dotted.getNext() == null) {
            if (dotted.getVariableName().equals("true") || dotted.getVariableName().equals("false")) {
              return new BooleanLiteral(dotted.getVariableName());
            }
          }
          if (stream.isEqualTo('(')) {
            return parseIntermediateFunctionCall(stream, dotted.getVariableName());
          }
View Full Code Here

Examples of org.jpox.store.mapped.expression.BooleanLiteral

            DatastoreMapping data_mapping = getDataStoreMapping(0);
            if (data_mapping.isBitBased() || data_mapping.isIntegerBased())
            {
                if (dba.isBitReallyBoolean())
                {
                    expr = new BooleanLiteral(qs, this, ((Boolean)value).booleanValue());
                }
                else
                {
                    expr = new BooleanBitColumnLiteral(qs, this, ((Boolean)value).booleanValue());
                }
            }
            else if (data_mapping.isBooleanBased())
            {
                expr = new BooleanLiteral(qs, this, ((Boolean)value).booleanValue());
            }
            else if (data_mapping.isStringBased())
            {
                expr = new BooleanCharColumnLiteral(qs, this, ((Boolean)value).booleanValue());
            }
            else
            {
                expr = new BooleanLiteral(qs, this, ((Boolean)value).booleanValue());
            }
        }
        else
        {
            expr = new BooleanLiteral(qs, this, ((Boolean)value).booleanValue());
        }
        return expr;
    }
View Full Code Here

Examples of org.springframework.expression.spel.ast.BooleanLiteral

    } else if (t.kind==TokenKind.LITERAL_REAL) {
      push(Literal.getRealLiteral(t.data, toPos(t),false));
    } else if (t.kind==TokenKind.LITERAL_REAL_FLOAT) {
      push(Literal.getRealLiteral(t.data, toPos(t), true));
    } else if (peekIdentifierToken("true")) {
      push(new BooleanLiteral(t.data,toPos(t),true));
    } else if (peekIdentifierToken("false")) {
      push(new BooleanLiteral(t.data,toPos(t),false));
    } else if (t.kind==TokenKind.LITERAL_STRING) {
      push(new StringLiteral(t.data,toPos(t),t.data));
    } else {
      return false;     
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.