Examples of Expression


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

     * index has not been set previously.
     *
     * @param operand
     */
    protected void addOperand(Expression operand) {
        Expression index = m_arrayAccess.getIndex();
        if (index == null) {
            m_arrayAccess.setIndex(operand);
        } else {
            throw new IllegalStateException("Internal error: attempt to set index expression more than once");
        }
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.ast.Expression

      String[] methods = Empty.STRINGS;
      String typeName = null;

      for (MemberValuePair pair : rescue.memberValuePairs()) {
        String name = String.valueOf(pair.name);
        Expression value = pair.value;

        if ("className".equals(name)) {
          typeName = value.constant.stringValue();

          // Invalid references should be caught in ArtificialRescueChecker
View Full Code Here

Examples of org.eclipse.persistence.expressions.Expression

                }
                // ignore the first token since we are assuming read all query
                // e.g. In e.phoneNumbers we will assume "e" refers to the base of the query
                String previousToken = tokenizer.nextToken();
                ClassDescriptor descriptor = raq.getDescriptor();
                Expression expression = raq.getExpressionBuilder();
                while (tokenizer.hasMoreTokens()){
                    String token = tokenizer.nextToken();
                    ForeignReferenceMapping frMapping = null;
                    DatabaseMapping mapping = descriptor.getObjectBuilder().getMappingForAttributeName(token);
                    if (mapping == null){
                        throw QueryException.queryHintNavigatedNonExistantRelationship(query, QueryHints.BATCH, valueToApply, previousToken + "." + token);
                    } else if (!mapping.isForeignReferenceMapping()){
                        throw QueryException.queryHintNavigatedIllegalRelationship(query, QueryHints.BATCH, valueToApply, previousToken + "." + token);
                    } else {
                        frMapping = (ForeignReferenceMapping)mapping;
                    }
                    descriptor = frMapping.getReferenceDescriptor();
                    if (frMapping.isCollectionMapping()){
                        expression = expression.anyOf(token);
                    } else {
                        expression = expression.get(token);
                    }
                    previousToken = token;
                }
                raq.addBatchReadAttribute(expression);
            } else {
View Full Code Here

Examples of org.eclipse.persistence.jpa.internal.jpql.parser.Expression

    // The KEY, VALUE, and ENTRY operators may only be applied to
    // identification variables that correspond to map-valued associations
    // or map-valued element collections
    if (expression.hasExpression()) {

      Expression childExpression = expression.getExpression();
      String variableName = queryContext.literal(childExpression, LiteralType.IDENTIFICATION_VARIABLE);

      // Retrieve the identification variable's type without traversing the type parameters
      if (ExpressionTools.stringIsNotEmpty(variableName)) {
        ITypeDeclaration typeDeclaration = getTypeDeclaration(childExpression);
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.parser.Expression

   * {@inheritDoc}
   */
  @Override
  public void visit(SelectClause expression) {

    Expression selectExpression = expression.getSelectExpression();

    // visit(CollectionExpression) iterates through the children but for a
    // SELECT clause, a CollectionExpression means the result type is Object[]
    CollectionExpression collectionExpression = getCollectionExpression(selectExpression);

    if (collectionExpression != null) {
      type = Object[].class;
    }
    else {
      selectExpression.accept(this);
    }
  }
View Full Code Here

Examples of org.eclipse.php.internal.core.ast.nodes.Expression

   
    return true;
  }

  public boolean visit(Variable variable) {
    Expression name = variable.getName();

    if (name.getType() == ASTNode.IDENTIFIER
        && variable.isDollared()
        // skip self::$var
        && variable.getParent().getType() != ASTNode.STATIC_FIELD_ACCESS
        // skip $this->var
        && variable.getParent().getType() != ASTNode.FIELD_ACCESS
View Full Code Here

Examples of org.eclipse.php.internal.debug.core.zend.debugger.Expression

  private void requestVariables() {
    PHPDebugTarget debugTarget = (PHPDebugTarget) getDebugTarget();
    ExpressionsManager expressionManager = debugTarget
        .getExpressionManager();
    Expression variable = fVariable;
    if (fGlobal) {
      String exp = "$GLOBALS[\"" + fVariable.getFullName().substring(1) //$NON-NLS-1$
          + "\"]"; //$NON-NLS-1$
      variable = new DefaultExpression(exp);
    }
    expressionManager.update(variable, 1);
    fValue = variable.getValue();

    initChildren(fValue);
  }
View Full Code Here

Examples of org.eclipse.xtend.lib.macro.expression.Expression

            _and_2 = _equals;
          }
          if (!_and_2) {
            _and_1 = false;
          } else {
            Expression _initializer = it.getInitializer();
            boolean _equals_1 = Objects.equal(_initializer, null);
            _and_1 = _equals_1;
          }
          if (!_and_1) {
            _and = false;
View Full Code Here

Examples of org.eclipselabs.emodeling.query.Expression

        }

        @Override
        public Object caseBinaryOperation(BinaryOperation binaryOperation)
        {
          Expression leftOperand = binaryOperation.getLeftOperand();
          String operator = binaryOperation.getOperator();

          if ("==".equals(operator))
          {
            Expression rightOperand = binaryOperation.getRightOperand();
            String property = ExpressionBuilder.toString(leftOperand);

            if (Keywords.ID_KEY.equals(property))
            {
              dbObject.put(property, new ObjectId(((Literal) rightOperand).getLiteralValue()));
            }
            else if (rightOperand instanceof Literal)
            {
              dbObject.put(property, getValue((Literal) rightOperand));
            }
            else if ("null".equals(ExpressionBuilder.toString(rightOperand)))
            {
              DBObject notExists = new BasicDBObject();
              notExists.put("$exists", Boolean.FALSE);
              dbObject.put(property, notExists);
            }
            else
            {
              // TODO: What to do?
            }
          }
          else if ("!=".equals(operator))
          {
            Expression rightOperand = binaryOperation.getRightOperand();
            String property = ExpressionBuilder.toString(leftOperand);
            if (rightOperand instanceof Literal)
            {
              DBObject notEqual = new BasicDBObject();
              notEqual.put("$ne", getValue((Literal) rightOperand));
              dbObject.put(property, notEqual);
            }
            else if ("null".equals(ExpressionBuilder.toString(rightOperand)))
            {
              DBObject exists = new BasicDBObject();
              exists.put("$exists", Boolean.TRUE);
              dbObject.put(property, exists);
            }
            else
            {
              // TODO: What to do?
            }
          }
          else if ("<".equals(operator) || "<=".equals(operator) || ">".equals(operator) || ">=".equals(operator))
          {
            Expression rightOperand = binaryOperation.getRightOperand();
            String property = ExpressionBuilder.toString(leftOperand);
            if (rightOperand instanceof Literal)
            {
              DBObject compare = new BasicDBObject();
              compare.put("<".equals(operator) ? QueryOperators.LT : "<=".equals(operator) ? QueryOperators.LTE : ">".equals(operator) ? QueryOperators.GT : QueryOperators.GTE,
View Full Code Here

Examples of org.elegant.aash.comparator.parsing.expr.Expression

      throw new ParsingException(stream, stream.syntaxError("dotted expression expected"));
    }
    DottedExpression expr = new DottedExpression(sVarName);
    stream.ignoreBlanks();
    if (stream.isEqualTo('[')) {
      Expression indexExpr = parseExpression(stream);
      stream.ignoreBlanks();
      if (!stream.isEqualTo(']')) {
        throw new ParsingException(stream, stream.syntaxError("']' expected"));
      }
      expr.setIndex(indexExpr);
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.