Package org.eclipse.jdt.core.dom

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


      println("(Assign \"" + node.getLeftHandSide() + "\"");
      expression++;
      node.getRightHandSide().accept(this);
    }
    else {
      ArrayAccess var = (ArrayAccess) node.getLeftHandSide();
      println("(ArrayAssign \""+ var.getArray() + "\"");
      expression++;
      var.getIndex().accept(this);
      node.getRightHandSide().accept(this);
    }
    return false;
  }
View Full Code Here


    if (TransformUtil.same(ltb, String.class)
        && node.getOperator() == Operator.PLUS_ASSIGN) {

      if (lhs instanceof ArrayAccess) {
        ArrayAccess aa = (ArrayAccess) lhs;
        hardDep(aa.getArray().resolveTypeBinding());
        aa.getArray().accept(this);
        print("->set(");
        aa.getIndex().accept(this);
        print(", ");

      } else {
        lhs.accept(this);
        print(" = ");
      }

      print("::java::lang::StringBuilder(");
      lhs.accept(this);
      print(").append(");
      castNull(rhs);
      print(")->toString()");

      if (lhs instanceof ArrayAccess) {
        print(")");
      }
      hardDep(ctx.resolve(StringBuilder.class));

      return false;
    }

    if (node.getOperator() == Operator.RIGHT_SHIFT_UNSIGNED_ASSIGN) {
      lhs.accept(this);
      print(" = ");
      if (ltb.getName().equals("long")) {
        print("static_cast<uint64_t>(");
      } else {
        print("static_cast<uint32_t>(");
      }
      lhs.accept(this);
      print(") >> ");
      rhs.accept(this);

      return false;
    }

    if (node.getOperator().equals(Operator.REMAINDER_ASSIGN)) {
      if (ltb.getName().equals("float") || ltb.getName().equals("double")) {
        fmod = true;
        lhs.accept(this);
        print(" = ");
        print("std::fmod(");
        lhs.accept(this);
        print(", ");
        lhs.accept(this);
        print(")");

        return false;
      }
    }

    if (node.getOperator() == Operator.ASSIGN
        && lhs instanceof ArrayAccess
        && !((ArrayAccess) lhs).getArray().resolveTypeBinding()
            .getComponentType().isPrimitive()) {
      ArrayAccess aa = (ArrayAccess) lhs;
      hardDep(aa.getArray().resolveTypeBinding());
      aa.getArray().accept(this);
      print("->set(");
      aa.getIndex().accept(this);
      print(", ");
      rhs.accept(this);
      print(")");
      return false;
    }
View Full Code Here

          return definedIn3rdPartyClass(scopeParent, qn.getName().toString());
        }
       
      }
    case ASTNode.ARRAY_ACCESS:
      ArrayAccess arac = (ArrayAccess)astNode;
      return resolveExpression3rdParty(nearestNode, arac.getArray(), noCompare);
    default:
      log("Unaccounted type " + getNodeAsString(astNode));
      break;
    }
   
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.dom.ArrayAccess

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.