Examples of NameReference


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

    positions,
    0,
    length);

  /* build specific completion on name reference */
  NameReference reference;
  if (completionIndex == 0) {
    /* completion inside first identifier */
    reference = createSingleAssistNameReference(assistIdentifier(), positions[0]);
  } else {
    /* completion inside subsequent identifier */
 
View Full Code Here

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

   ==>
  this.astStack : Argument
  this.identifierStack :
  this.intStack :
  */
  NameReference qualifyingNameReference = null;
    boolean isReceiver = this.intStack[this.intPtr--] == 0// flag pushed in consumeExplicitThisParameter -> 0, consumeVariableDeclaratorIdParameter -> 1
    if (isReceiver) {
      qualifyingNameReference = (NameReference) this.expressionStack[this.expressionPtr--];
      this.expressionLengthPtr --;
    }
View Full Code Here

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

protected void consumeExplicitThisParameter(boolean isQualified) {
  // VariableDeclaratorIdOrThis ::= 'this'
  // VariableDeclaratorIdOrThis ::= UnannotatableName '.' 'this'
  // VariableDeclaratorIdOrThis ::= VariableDeclaratorId

  NameReference qualifyingNameReference = null;
  if (isQualified) {
    qualifyingNameReference = getUnspecifiedReference(false); // By construction the qualified name is unannotated here, so we should not meddle with the type annotation stack
  }
  pushOnExpressionStack(qualifyingNameReference);
  int thisStart = this.intStack[this.intPtr--];
View Full Code Here

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

  /* build a (unspecified) NameReference which may be qualified*/
  if (rejectTypeAnnotations) { // Compensate for overpermissive grammar.
    consumeNonTypeUseName();
  }
  int length;
  NameReference ref;
  if ((length = this.identifierLengthStack[this.identifierLengthPtr--]) == 1)
    // single variable reference
    ref =
      new SingleNameReference(
        this.identifierStack[this.identifierPtr],
View Full Code Here

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

  a field access. This optimization is IMPORTANT while it results
  that when a NameReference is build, the type checker should always
  look for that it is not a type reference */
  consumeNonTypeUseName();
  int length;
  NameReference ref;
  if ((length = this.identifierLengthStack[this.identifierLengthPtr--]) == 1) {
    // single variable reference
    ref =
      new SingleNameReference(
        this.identifierStack[this.identifierPtr],
View Full Code Here

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

      this.lastIgnoredToken = -1;
    }
    this.isOrphanCompletionNode = true;
    return new SingleNameReference(CharOperation.NO_CHAR, 0); // dummy reference
  }
  NameReference nameReference;
  /* retrieve identifiers subset and whole positions, the completion node positions
    should include the entire replaced source. */
  char[][] subset = identifierSubSet(completionIndex);
  this.identifierLengthPtr--;
  this.identifierPtr -= length;
View Full Code Here

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

* instead.
*/
protected NameReference getUnspecifiedReferenceOptimized() {

  int index = indexOfAssistIdentifier();
  NameReference reference = super.getUnspecifiedReferenceOptimized();

  if (index >= 0){
    if (!this.diet){
      this.restartRecovery  = true// force to restart in recovery mode
      this.lastIgnoredToken = -1;
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
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.