Package org.eclipse.jdt.internal.debug.eval.ast.instructions

Examples of org.eclipse.jdt.internal.debug.eval.ast.instructions.SendMessage


   * true if a storeInstruction() is needed after visiting the expression
   */
  private boolean unBoxing(ITypeBinding valueBinding) {
    String valueTypeName = valueBinding.getQualifiedName();
    if ("java.lang.Integer".equals(valueTypeName)) { //$NON-NLS-1$
      push(new SendMessage("intValue", "()I", 0, null, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$
    } else if ("java.lang.Character".equals(valueTypeName)) { //$NON-NLS-1$
      push(new SendMessage("charValue", "()C", 0, null, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$
    } else if ("java.lang.Byte".equals(valueTypeName)) { //$NON-NLS-1$
      push(new SendMessage("byteValue", "()B", 0, null, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$
    } else if ("java.lang.Short".equals(valueTypeName)) { //$NON-NLS-1$
      push(new SendMessage("shortValue", "()S", 0, null, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$
    } else if ("java.lang.Long".equals(valueTypeName)) { //$NON-NLS-1$
      push(new SendMessage("longValue", "()J", 0, null, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$
    } else if ("java.lang.Float".equals(valueTypeName)) { //$NON-NLS-1$
      push(new SendMessage("floatValue", "()F", 0, null, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$
    } else if ("java.lang.Double".equals(valueTypeName)) { //$NON-NLS-1$
      push(new SendMessage("doubleValue", "()D", 0, null, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$
    } else if ("java.lang.Boolean".equals(valueTypeName)) { //$NON-NLS-1$
      push(new SendMessage("booleanValue", "()Z", 0, null, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$
    } else {
      return false;
    }
    return true;
  }
View Full Code Here


    } else {
      // the expression returns a collection
      String iteratorIdentifier = "#i" + fUniqueIdIndex++; //$NON-NLS-1$
      push(new LocalVariableCreation(iteratorIdentifier,
          "Ljava/util/Iterator;", 0, false, true, fCounter)); //$NON-NLS-1$
      push(new SendMessage(
          "iterator", "()Ljava/util/Iterator;", 0, null, fCounter)); //$NON-NLS-1$//$NON-NLS-2$
      node.getExpression().accept(this);
      storeInstruction();
      storeInstruction();
      push(new LocalVariableCreation(paramIdentifier, typeSignature, 0,
          isParamPrimitiveType, false, fCounter));
      storeInstruction();

      push(new SendMessage("hasNext", "()Z", 0, null, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$
      push(new PushLocalVariable(iteratorIdentifier));
      storeInstruction();
      storeInstruction();

      // conditional jump will be added here

      push(new NoOp(fCounter));
      push(new AssignmentOperator(paramTypeId, paramTypeId, fCounter));
      push(new PushLocalVariable(paramIdentifier));
      storeInstruction();
      push(new SendMessage(
          "next", "()Ljava/lang/Object;", 0, null, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$
      push(new PushLocalVariable(iteratorIdentifier));
      storeInstruction();
      storeInstruction();
      if (checkAutoBoxing(typeBinding.getTypeArguments()[0], paramBinding)) {
View Full Code Here

      if (expression != null) {
        node.getExpression().accept(this);
        addPopInstruction();
      }
    } else {
      push(new SendMessage(selector, signature, paramCount, null,
          fCounter));
      if (expression == null) {
        push(new PushThis(getEnclosingLevel(node,
            methodBinding.getDeclaringClass())));
        storeInstruction();
View Full Code Here

    if (Modifier.isStatic(methodBinding.getModifiers())) {
      push(new SendStaticMessage(
          getTypeName(methodBinding.getDeclaringClass()), selector,
          signature, paramCount, fCounter));
    } else {
      push(new SendMessage(selector, signature, paramCount,
          getTypeSignature(methodBinding.getDeclaringClass()),
          fCounter));
      int enclosingLevel = 0;
      if (qualifier != null) {
        ITypeBinding typeBinding = (ITypeBinding) resolveBinding(qualifier);
View Full Code Here

          push(jumpDefault);
          storeInstruction(); // jump
          statementsDefault = new ArrayList<Statement>();
        } else {
          if (switchCase.getExpression() instanceof StringLiteral) {
            push(new SendMessage(
                "equals", "(Ljava/lang/Object;)Z", 1, null, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$
          } else {
            push(new EqualEqualOperator(Instruction.T_int,
                Instruction.T_int, true, fCounter));
          }
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.debug.eval.ast.instructions.SendMessage

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.