Package org.eclipse.jdt.internal.compiler.ast

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


      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

* 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

       * 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

Related Classes of org.eclipse.jdt.internal.compiler.ast.NameReference

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.