Examples of NullLiteral


Examples of org.apache.expreval.expr.literal.NullLiteral

    }

    private GenericValue getValueExpr(final Serializable val) throws InvalidTypeException {

        if (val == null)
            return new NullLiteral();

        if (val instanceof Boolean)
            return new BooleanLiteral((Boolean)val);

        if (val instanceof Character)
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.NullLiteral

    ArrayInitializer init = new ArrayInitializer();
    init.expressions = new Expression[nExprs + nParams];
    int index = 0;
    for (int i = 0; i < nExprs; i++) {
      if (i >= (explicitConstructorCall.arguments == null ? 0 : explicitConstructorCall.arguments.length)) {
        init.expressions[index++] = new NullLiteral(0, 0);
        continue;
      }

      Expression arg = explicitConstructorCall.arguments[i];
      ResolvedMember conversionMethod = AjcMemberMaker.toObjectConversionMethod(world
          .fromBinding(explicitConstructorCall.binding.parameters[i]));
      if (conversionMethod != null) {
        arg = new KnownMessageSend(world.makeMethodBindingForCall(conversionMethod), new CastExpression(new NullLiteral(0,
            0), AstUtil.makeTypeReference(world.makeTypeBinding(AjcMemberMaker.CONVERSIONS_TYPE))),
            new Expression[] { arg });
      }
      init.expressions[index++] = arg;
    }

    for (int i = 0; i < nParams; i++) {
      LocalVariableBinding binding = pre.arguments[i].binding;
      Expression arg = AstUtil.makeResolvedLocalVariableReference(binding);
      ResolvedMember conversionMethod = AjcMemberMaker.toObjectConversionMethod(world.fromBinding(binding.type));
      if (conversionMethod != null) {
        arg = new KnownMessageSend(world.makeMethodBindingForCall(conversionMethod), new CastExpression(new NullLiteral(0,
            0), AstUtil.makeTypeReference(world.makeTypeBinding(AjcMemberMaker.CONVERSIONS_TYPE))),
            new Expression[] { arg });
      }
      init.expressions[index++] = arg;
    }
View Full Code Here

Examples of org.candle.decompiler.intermediate.expression.NullLiteral

    }
  }

  public void visitACONST_NULL(ACONST_NULL instruction) {
    //load from constant pool.
    NullLiteral cons = new NullLiteral(context.getCurrentInstruction());
    context.getExpressions().push(cons);
  }
View Full Code Here

Examples of org.candle.decompiler.intermediate.expression.NullLiteral

  }
 
  @Override
  public void visitIFNULL(IFNULL instruction) {
    Expression left = context.getExpressions().pop();
    Expression right = new NullLiteral(context.getCurrentInstruction());
   
    MultiConditional conditional = new MultiConditional(context.getCurrentInstruction(), left, right, OperationType.EQ);
    BooleanBranchIntermediate line = new BooleanBranchIntermediate(context.getCurrentInstruction(), conditional);
    context.pushIntermediateToInstruction(line);
  }
View Full Code Here

Examples of org.candle.decompiler.intermediate.expression.NullLiteral

  }

  @Override
  public void visitIFNONNULL(IFNONNULL instruction) {
    Expression left = context.getExpressions().pop();
    Expression right = new NullLiteral(context.getCurrentInstruction());
   
    MultiConditional conditional = new MultiConditional(context.getCurrentInstruction(), left, right, OperationType.NE);
    BooleanBranchIntermediate line = new BooleanBranchIntermediate(context.getCurrentInstruction(), conditional);
    context.pushIntermediateToInstruction(line);
  }
View Full Code Here

Examples of org.datanucleus.store.mapped.expression.NullLiteral

            if (allowNulls)
            {
                // Allow for null value of discriminator
                ScalarExpression expr = discriminatorMapping.newScalarExpression(stmt, discrimTableExpr);
                ScalarExpression val = new NullLiteral(stmt);
                BooleanExpression nullDiscExpr = expr.eq(val);
                discExpr = discExpr.ior(nullDiscExpr);
                if (!multipleDiscriminatorValues)
                {
                    multipleDiscriminatorValues = true;
View Full Code Here

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

            if (hasOption(OPTION_ALLOW_NULLS))
            {
                // Allow for null value of discriminator
                SQLExpression expr = stmt.getSQLExpressionFactory().newExpression(stmt, discrimSqlTbl,
                    discMapping);
                SQLExpression val = new NullLiteral(stmt, null, null, null);
                BooleanExpression nullDiscExpr = expr.eq(val);
                discExpr = discExpr.ior(nullDiscExpr);
                if (!multipleCandidates)
                {
                    multipleCandidates = true;
View Full Code Here

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

        }

        SQLExpression expr = (SQLExpression)args.get(0);
        if (expr == null)
        {
            return new NullLiteral(stmt, null, null, null);
        }
        else if (expr instanceof SQLLiteral)
        {
            if (expr instanceof ByteLiteral)
            {
View Full Code Here

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

        }

        SQLExpression expr = (SQLExpression)args.get(0);
        if (expr == null)
        {
            return new NullLiteral(stmt, null, null, null);
        }
        if (expr instanceof SQLLiteral)
        {
            RDBMSStoreManager storeMgr = stmt.getRDBMSManager();
            ApiAdapter api = storeMgr.getApiAdapter();
            Object id = api.getIdForObject(((SQLLiteral)expr).getValue());
            if (id == null)
            {
                return new NullLiteral(stmt, null, null, null);
            }
            else
            {
                JavaTypeMapping m = getMappingForClass(id.getClass());
                return new ObjectLiteral(stmt, m, id, null);
View Full Code Here

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

                    SQLTable sqlTableSubclass =
                        stmt.leftOuterJoin(null, tableIdMapping, subclassTables[i], null, subclassIdMapping,
                            null, stmt.getPrimaryTable().getGroupName());

                    SQLExpression subclassIdExpr = factory.newExpression(stmt, sqlTableSubclass, subclassIdMapping);
                    SQLExpression nullExpr = new NullLiteral(stmt, null, null, null);
                    stmt.whereAnd(subclassIdExpr.eq(nullExpr), 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.