Examples of CastExpression


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

      // dead expression, it's valid just goes no where.
      break;
    }

    case ASTNode.CAST_EXPRESSION: {
      final CastExpression cast = (CastExpression) node;
      throw new NonEnumerizableCastExpression(Messages.ASTNodeProcessor_IllegalNodeContext,
          node, cast.getExpression().resolveTypeBinding(), cast
              .getType().resolveBinding());
    }

    case ASTNode.ENUM_CONSTANT_DECLARATION:
    case ASTNode.IF_STATEMENT:
View Full Code Here

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

      }
      break;
    }

    case ASTNode.CAST_EXPRESSION: {
      final CastExpression cast = (CastExpression) node;
      throw new NonEnumerizableCastExpression(Messages.ASTNodeProcessor_IllegalNodeContext,
          node, cast.getExpression().resolveTypeBinding(), cast
              .getType().resolveBinding());
    }

    case ASTNode.ENUM_CONSTANT_DECLARATION:
    case ASTNode.IF_STATEMENT:
View Full Code Here

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

        MethodInvocation cloneInvoke = invokeClone(workingUnit, original);



        // cast the result to the right type
        CastExpression castRet = workingUnit.getAST().newCastExpression();
        castRet.setExpression(cloneInvoke);
        Type retType = (Type) ASTNode.copySubtree(castRet.getAST(), method.getReturnType2());
        castRet.setType(retType);


        ConditionalExpression conditionalExpression = workingUnit.getAST().newConditionalExpression();
        conditionalExpression.setElseExpression(castRet);
        conditionalExpression.setThenExpression(workingUnit.getAST().newNullLiteral() );
View Full Code Here

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

  Expression cast;
  Expression exp;
  this.expressionPtr--;
  this.expressionStack[this.expressionPtr] =
    cast = new CastExpression(
      exp=this.expressionStack[this.expressionPtr+1] ,
      (TypeReference) this.expressionStack[this.expressionPtr]);
  this.expressionLengthPtr -- ;
  updateSourcePosition(cast);
  cast.sourceEnd=exp.sourceEnd;
View Full Code Here

Examples of org.eclipse.php.internal.core.compiler.ast.nodes.CastExpression

    super(goal);
  }

  public IGoal[] init() {
    ExpressionTypeGoal typedGoal = (ExpressionTypeGoal) goal;
    CastExpression castExpression = (CastExpression) typedGoal
        .getExpression();
    int operator = castExpression.getCastType();
    switch (operator) {
    case CastExpression.TYPE_INT:
    case CastExpression.TYPE_REAL:
      result = new SimpleType(SimpleType.TYPE_NUMBER);
      break;
    case CastExpression.TYPE_STRING:
      result = new SimpleType(SimpleType.TYPE_STRING);
      break;
    case CastExpression.TYPE_ARRAY:
      result = new SimpleType(SimpleType.TYPE_ARRAY);
      break;
    case CastExpression.TYPE_OBJECT:
      return new IGoal[] { new ExpressionTypeGoal(typedGoal.getContext(),
          castExpression.getExpr()) };
    case CastExpression.TYPE_BOOL:
      result = new SimpleType(SimpleType.TYPE_BOOLEAN);
      break;
    case CastExpression.TYPE_UNSET:
      result = new SimpleType(SimpleType.TYPE_NULL);
View Full Code Here

Examples of org.openquark.cal.internal.javamodel.JavaExpression.CastExpression

    /* (non-Javadoc)
     * @see org.openquark.cal.internal.runtime.lecc.JavaModelVisitor#visitCastExpression(org.openquark.cal.internal.runtime.lecc.JavaExpression.CastExpression, java.lang.Object)
     */
    public JavaExpression visitCastExpression(CastExpression cast, T arg) {
        return new CastExpression (
                cast.getCastType(),
                (JavaExpression)cast.getExpressionToCast().accept(this, arg));
    }
View Full Code Here

Examples of org.pdf4j.saxon.expr.CastExpression

                err.setErrorCode("XPST0017");
                err.setIsStaticError(true);
                throw err;
            }

            return new CastExpression(arguments[0], type, true);
        }

        // Now see if it's a constructor function for a user-defined type

        if (arguments.length == 1) {
            int fp = config.getNamePool().getFingerprint(uri, localName);
            if (fp != -1) {
                SchemaType st = config.getSchemaType(fp);
                if (st != null && st.isAtomicType()) {
                    return new CastExpression(arguments[0], (AtomicType)st, true);
                }
            }
        }

        return null;
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.