Package org.eclipse.jdt.internal.compiler.lookup

Examples of org.eclipse.jdt.internal.compiler.lookup.FieldBinding.original()


        if (field.isStatic()) {
          if (!flowInfo.isDefinitelyAssigned(field)) {
            if (field.isFinal()) {
              this.scope.problemReporter().uninitializedBlankFinalField(
                  field,
                  this.scope.referenceType().declarationOf(field.original()));
              // can complain against the field decl, since only one <clinit>
            } else if (field.isNonNull()) {
              this.scope.problemReporter().uninitializedNonNullField(
                  field,
                  this.scope.referenceType().declarationOf(field.original()));
View Full Code Here


                  this.scope.referenceType().declarationOf(field.original()));
              // can complain against the field decl, since only one <clinit>
            } else if (field.isNonNull()) {
              this.scope.problemReporter().uninitializedNonNullField(
                  field,
                  this.scope.referenceType().declarationOf(field.original()));
            }
          }
        }
      }
      // check static initializers thrown exceptions
View Full Code Here

        if ((field.modifiers & ClassFileConstants.AccEnum) == 0) {
           scope.problemReporter().enumSwitchCannotTargetField(reference, field);
        } else   if (reference instanceof QualifiedNameReference) {
           scope.problemReporter().cannotUseQualifiedEnumConstantInCaseLabel(reference, field);
        }
        return IntConstant.fromValue(field.original().id + 1); // (ordinal value + 1) zero should not be returned see bug 141810
      }
    } else {
      return this.constantExpression.constant;
    }
  } else if (isBoxingCompatible(caseType, switchExpressionType, this.constantExpression, scope)) {
View Full Code Here

        if (this.binding instanceof FieldBinding) {
          this.bits &= ~ASTNode.RestrictiveFlagMASK; // clear bits
          this.bits |= Binding.FIELD;
          FieldBinding fieldBinding = (FieldBinding) this.binding;
          MethodScope methodScope = scope.methodScope();
          ReferenceBinding declaringClass = fieldBinding.original().declaringClass;
          SourceTypeBinding sourceType = methodScope.enclosingSourceType();
          // check for forward references
          if ((this.indexOfFirstFieldBinding == 1 || (fieldBinding.modifiers & ClassFileConstants.AccEnum) != 0 || (!fieldBinding.isFinal() && declaringClass.isEnum())) // enum constants are checked even when qualified
              && TypeBinding.equalsEquals(sourceType, declaringClass)
              && methodScope.lastVisibleFieldID >= 0
View Full Code Here

* Check and/or redirect the field access to the delegate receiver if any
*/
public TypeBinding checkFieldAccess(BlockScope scope) {
  FieldBinding fieldBinding = (FieldBinding) this.binding;
  MethodScope methodScope = scope.methodScope();
  TypeBinding declaringClass = fieldBinding.original().declaringClass;
  // check for forward references
  if ((this.indexOfFirstFieldBinding == 1 || declaringClass.isEnum())
      && TypeBinding.equalsEquals(methodScope.enclosingSourceType(), declaringClass)
      && methodScope.lastVisibleFieldID >= 0
      && fieldBinding.id >= methodScope.lastVisibleFieldID
View Full Code Here

        if (this.binding instanceof FieldBinding) {
          this.bits &= ~ASTNode.RestrictiveFlagMASK; // clear bits
          this.bits |= Binding.FIELD;
          FieldBinding fieldBinding = (FieldBinding) this.binding;
          MethodScope methodScope = scope.methodScope();
          ReferenceBinding declaringClass = fieldBinding.original().declaringClass;
          SourceTypeBinding sourceType = methodScope.enclosingSourceType();
          // check for forward references
          if ((this.indexOfFirstFieldBinding == 1 || (fieldBinding.modifiers & ClassFileConstants.AccEnum) != 0 || (!fieldBinding.isFinal() && declaringClass.isEnum())) // enum constants are checked even when qualified
              && sourceType == declaringClass
              && methodScope.lastVisibleFieldID >= 0
View Full Code Here

  if (isFieldUseDeprecated(fieldBinding, scope, this.bits))
    scope.problemReporter().deprecatedField(fieldBinding, this);

  if ((this.bits & ASTNode.IsStrictlyAssigned) == 0
      && methodScope.enclosingSourceType() == fieldBinding.original().declaringClass
      && methodScope.lastVisibleFieldID >= 0
      && fieldBinding.id >= methodScope.lastVisibleFieldID
      && (!fieldBinding.isStatic() || methodScope.isStatic)) {
    scope.problemReporter().forwardReference(this, 0, fieldBinding);
    this.bits |= ASTNode.IgnoreNoEffectAssignCheck;
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.