Examples of NameReference


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

    CompilationAndWeavingContext.leavingPhase(tok);
    return ret;
  }

  private void replaceEffectivelyStaticRef(MessageSend call) {
    NameReference receiver = (NameReference) call.receiver;

    // Don't continue if the call binding is null, as we are going to report an error about this line of code!
    if (call.binding == null)
      return;
View Full Code Here

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

    return super.visit(call, scope);
  }

  private void replaceEffectivelyStaticRef(MessageSend call) {
    //System.err.println("replace static ref");
    NameReference receiver = (NameReference) call.receiver;
    receiver.binding = thisJoinPointStaticPartDecLocal; //thisJoinPointStaticPartDec;
    receiver.codegenBinding = thisJoinPointStaticPartDecLocal;

    call.binding.declaringClass =
      (ReferenceBinding) thisJoinPointStaticPartDec.type;
View Full Code Here

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

    CompilationAndWeavingContext.leavingPhase(tok);
    return ret;
  }

  private void replaceEffectivelyStaticRef(MessageSend call) {
    NameReference receiver = (NameReference) call.receiver;
   
    // Don't continue if the call binding is null, as we are going to report an error about this line of code!
    if (call.binding==null) return
   
    //System.err.println("replace static ref: " + receiver + " is " + System.identityHashCode(receiver));
View Full Code Here

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

    return super.visit(call, scope);
  }

  private void replaceEffectivelyStaticRef(MessageSend call) {
    //System.err.println("replace static ref");
    NameReference receiver = (NameReference) call.receiver;
    receiver.binding = thisJoinPointStaticPartDecLocal; //thisJoinPointStaticPartDec;
    receiver.codegenBinding = thisJoinPointStaticPartDecLocal;

    call.binding.declaringClass =
      (ReferenceBinding) thisJoinPointStaticPartDec.type;
View Full Code Here

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

       * Any primitive types, conditionals, strings, arrays and name references
       * to constant fields will have all been handled by the constant
       * expression block above. This name reference can only be for an
       * enumerated type.
       */
      NameReference nameRef = (NameReference) elementValueExpression;

      assert (nameRef.constant == null || nameRef.constant == Constant.NotAConstant);
      assert (nameRef.actualReceiverType.isEnum());

      Class<?> clazz = getClassLiteral(logger, nameRef.actualReceiverType);
      Class<? extends Enum> enumClass = clazz.asSubclass(Enum.class);

      String enumName = String.valueOf(nameRef.fieldBinding().name);
      elementValue = Enum.valueOf(enumClass, enumName);
    } else if (elementValueExpression instanceof Annotation) {
      elementValue = createAnnotationInstance(logger, elementValueExpression);
    } else {
      assert (false);
View Full Code Here

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

       * Any primitive types, conditionals, strings, arrays and name references
       * to constant fields will have all been handled by the constant
       * expression block above. This name reference can only be for an
       * enumerated type.
       */
      NameReference nameRef = (NameReference) elementValueExpression;

      assert (nameRef.constant == null || nameRef.constant == Constant.NotAConstant);
      assert (nameRef.actualReceiverType.isEnum());

      Class<?> clazz = getClassLiteral(logger, nameRef.actualReceiverType);
      Class<? extends Enum> enumClass = clazz.asSubclass(Enum.class);

      String enumName = String.valueOf(nameRef.fieldBinding().name);
      elementValue = Enum.valueOf(enumClass, enumName);
    } else if (elementValueExpression instanceof Annotation) {
      elementValue = createAnnotationInstance(logger, elementValueExpression);
    } else {
      assert (false);
View Full Code Here

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

       * Any primitive types, conditionals, strings, arrays and name references
       * to constant fields will have all been handled by the constant
       * expression block above. This name reference can only be for an
       * enumerated type.
       */
      NameReference nameRef = (NameReference) elementValueExpression;

      assert (nameRef.constant == null || nameRef.constant == Constant.NotAConstant);
      assert (nameRef.actualReceiverType.isEnum());

      Class<?> clazz = getClassLiteral(logger, nameRef.actualReceiverType);
      Class<? extends Enum> enumClass = clazz.asSubclass(Enum.class);

      String enumName = String.valueOf(nameRef.fieldBinding().name);
      elementValue = Enum.valueOf(enumClass, enumName);
    } else if (elementValueExpression instanceof Annotation) {
      elementValue = createAnnotationInstance(logger, elementValueExpression);
    } else {
      assert (false);
View Full Code Here

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

        } else if (constantExpression instanceof JLiteral) {
          caseLiteral = (JLiteral) constantExpression;
        } else {
          // Adapted from CaseStatement.resolveCase().
          assert x.constantExpression.resolvedType.isEnum();
          NameReference reference = (NameReference) x.constantExpression;
          FieldBinding field = reference.fieldBinding();
          caseLiteral = JIntLiteral.get(field.original().id);
        }
        push(new JCaseStatement(info, caseLiteral));
      } catch (Throwable e) {
        throw translateException(x, e);
View Full Code Here

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

      }
      this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier, false);
    } else {
      if (argument.isReceiver()) {
        this.scribe.space();
        NameReference qualifyingName = ((Receiver) argument).qualifyingName;
        if (qualifyingName != null) {
          qualifyingName.traverse(this, scope);
          this.scribe.printNextToken(TerminalTokens.TokenNameDOT, false);
        }
        this.scribe.printNextToken(TerminalTokens.TokenNamethis, false);
      } else {
        /*
 
View Full Code Here

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

        } else if (constantExpression instanceof JLiteral) {
          caseLiteral = (JLiteral) constantExpression;
        } else {
          // Adapted from CaseStatement.resolveCase().
          assert x.constantExpression.resolvedType.isEnum();
          NameReference reference = (NameReference) x.constantExpression;
          FieldBinding field = reference.fieldBinding();
          caseLiteral = JIntLiteral.get(field.original().id);
        }
        push(new JCaseStatement(info, caseLiteral));
      } catch (Throwable e) {
        throw translateException(x, e);
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.