Examples of ThisReference


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

        printExpression(ar.receiver).append('[');
        return printExpression(ar.position).append(']');
      } else if (e instanceof MessageSend) {
        return printMessageSendStatement((MessageSend) e);
      } else if (e instanceof ThisReference) {
        ThisReference tr = (ThisReference) e;
        if (tr.isImplicitThis()) {
          return output;
        }
        return output.append("this"); //$NON-NLS-1$
      } else if (e instanceof CastExpression) {
        return printCastExpression((CastExpression) e);
View Full Code Here

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

      return;
    if (send.binding == null || !send.binding.isValidBinding())
      return;

    if (send.isSuperAccess() && !send.binding.isStatic()) {
      send.receiver = new ThisReference(send.sourceStart, send.sourceEnd);
      // send.arguments = AstUtil.insert(new ThisReference(send.sourceStart, send.sourceEnd), send.arguments);
      MethodBinding superAccessBinding = getSuperAccessMethod(send.binding);
      AstUtil.replaceMethodBinding(send, superAccessBinding);
    } else if (!isPublic(send.binding)) {
      send.syntheticAccessor = getAccessibleMethod(send.binding, send.actualReceiverType);
View Full Code Here

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

      }
    } else if (depthCounter == 0) { // Allow case testSuperItds_pr198196_2/3

      char[] accessName;
      if (call.isSuperAccess() && !call.binding.isStatic()) {
        call.receiver = new ThisReference(call.receiver.sourceStart, call.receiver.sourceEnd);
        accessName = NameMangler.superDispatchMethod(factory.fromBinding(targetClass), new String(superBinding.selector))
            .toCharArray();
      } else if (call.receiver.isThis() && call.binding.isProtected() && !call.binding.isStatic()) {
        // XXX this is a hack that violates some binary compatibility rules
        ReferenceBinding superBindingDeclaringClass = superBinding.declaringClass;
View Full Code Here

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

        case ASTNode.CHARACTER_LITERAL :
        case ASTNode.NUMBER_LITERAL :
          Literal literal = (Literal) this.newAstToOldAst.get(expression);
          return this.getTypeBinding(literal.literalType(null));
        case ASTNode.THIS_EXPRESSION :
          ThisReference thisReference = (ThisReference) this.newAstToOldAst.get(expression);
          BlockScope blockScope = (BlockScope) this.astNodesToBlockScope.get(expression);
          if (blockScope != null) {
            return this.getTypeBinding(thisReference.resolveType(blockScope));
          }
          break;
        case ASTNode.PARENTHESIZED_EXPRESSION :
          ParenthesizedExpression parenthesizedExpression = (ParenthesizedExpression) expression;
          return this.resolveExpressionType(parenthesizedExpression.getExpression());
View Full Code Here

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

      EclipseFactory factory = ((AjLookupEnvironment)method.scope.environment()).factory;

    char[] accessName;
    if (call.isSuperAccess() && !call.binding.isStatic()) {
      call.receiver = new ThisReference(call.receiver.sourceStart, call.receiver.sourceEnd);
      accessName =
        NameMangler.superDispatchMethod(factory.fromBinding(targetClass),
              new String(superBinding.selector)).toCharArray();
    } else if (call.receiver.isThis() && call.binding.isProtected() && !call.binding.isStatic()) {
      //XXX this is a hack that violates some binary compatibility rules
View Full Code Here

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

  public void endVisit(MessageSend send, BlockScope scope) {
    if (send instanceof Proceed) return;
    if (send.binding == null || !send.binding.isValidBinding()) return;
   
    if (send.isSuperAccess() && !send.binding.isStatic()) {
      send.receiver = new ThisReference(send.sourceStart, send.sourceEnd);
      MethodBinding superAccessBinding = getSuperAccessMethod(send.binding);
      AstUtil.replaceMethodBinding(send, superAccessBinding);
    } else if (!isPublic(send.binding)) {
      send.syntheticAccessor = getAccessibleMethod(send.binding, send.actualReceiverType);
    }
View Full Code Here

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

          if (literal != null) {
            return this.getTypeBinding(literal.literalType(null));
          }
          break;
        case ASTNode.THIS_EXPRESSION :
          ThisReference thisReference = (ThisReference) this.newAstToOldAst.get(expression);
          BlockScope blockScope = (BlockScope) this.astNodesToBlockScope.get(expression);
          if (blockScope != null) {
            return this.getTypeBinding(thisReference.resolveType(blockScope));
          }
          break;
        case ASTNode.PARENTHESIZED_EXPRESSION :
          ParenthesizedExpression parenthesizedExpression = (ParenthesizedExpression) expression;
          return resolveExpressionType(parenthesizedExpression.getExpression());
View Full Code Here

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

          if (literal != null) {
            return this.getTypeBinding(literal.literalType(null));
          }
          break;
        case ASTNode.THIS_EXPRESSION :
          ThisReference thisReference = (ThisReference) this.newAstToOldAst.get(expression);
          BlockScope blockScope = (BlockScope) this.astNodesToBlockScope.get(expression);
          if (blockScope != null) {
            return this.getTypeBinding(thisReference.resolveType(blockScope));
          }
          break;
        case ASTNode.PARENTHESIZED_EXPRESSION :
          ParenthesizedExpression parenthesizedExpression = (ParenthesizedExpression) expression;
          return resolveExpressionType(parenthesizedExpression.getExpression());
View Full Code Here

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

          if (literal != null) {
            return this.getTypeBinding(literal.literalType(null));
          }
          break;
        case ASTNode.THIS_EXPRESSION :
          ThisReference thisReference = (ThisReference) this.newAstToOldAst.get(expression);
          BlockScope blockScope = (BlockScope) this.astNodesToBlockScope.get(expression);
          if (blockScope != null) {
            return this.getTypeBinding(thisReference.resolveType(blockScope));
          }
          break;
        case ASTNode.PARENTHESIZED_EXPRESSION :
          ParenthesizedExpression parenthesizedExpression = (ParenthesizedExpression) expression;
          return resolveExpressionType(parenthesizedExpression.getExpression());
View Full Code Here

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

    cla = new ClassLiteralAccess(this.intStack[this.intPtr--], getTypeReference(0)));
  rejectIllegalTypeAnnotations(cla.type);
}
protected void consumePrimaryNoNewArrayThis() {
  // PrimaryNoNewArray ::= 'this'
  pushOnExpressionStack(new ThisReference(this.intStack[this.intPtr--], this.endPosition));
}
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.