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

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.lookup.MethodScope.enclosingSourceType()


    }
    EclipseFactory factory = ((AjLookupEnvironment) method.scope.environment()).factory;
    if (depthCounter != 0 && targetClass.isInterface()) {// pr198196 - when calling MarkerInterface.super.XXX()
      if (call.isSuperAccess() && !call.binding.isStatic()) {
        MethodScope currentMethodScope = scope.methodScope();
        SourceTypeBinding sourceType = currentMethodScope.enclosingSourceType();
        FieldBinding field = sourceType.addSyntheticFieldForInnerclass(targetClass);
        call.receiver = new KnownFieldReference(field, call.receiver.sourceStart, call.receiver.sourceEnd);
      } else {
        return;
      }
View Full Code Here


      if (this.indexOfFirstFieldBinding == 1) { // was an implicit reference to the first field binding
        ReferenceBinding declaringClass = lastFieldBinding.declaringClass;
        // check if accessing enum static field in initializer         
        if (declaringClass.isEnum()) {
          MethodScope methodScope = currentScope.methodScope();
          SourceTypeBinding sourceType = methodScope.enclosingSourceType();
          if (lastFieldBinding.isStatic()
              && (sourceType == declaringClass || sourceType.superclass == declaringClass) // enum constant body
              && lastFieldBinding.constant() == Constant.NotAConstant
              && !methodScope.isStatic
              && methodScope.isInsideInitializerOrConstructor()) {
View Full Code Here

        FieldBinding fieldBinding = (FieldBinding) this.binding;
        ReferenceBinding declaringClass = fieldBinding.declaringClass;
        // check if accessing enum static field in initializer         
        if (declaringClass.isEnum()) {
          MethodScope methodScope = currentScope.methodScope();
          SourceTypeBinding sourceType = methodScope.enclosingSourceType();
          if (fieldBinding.isStatic()
              && (sourceType == declaringClass || sourceType.superclass == declaringClass) // enum constant body
              && fieldBinding.constant() == Constant.NotAConstant
              && !methodScope.isStatic
              && methodScope.isInsideInitializerOrConstructor()) {
View Full Code Here

public TypeBinding checkFieldAccess(BlockScope scope) {
  FieldBinding fieldBinding = (FieldBinding) this.binding;
  MethodScope methodScope = scope.methodScope();
  // check for forward references
  if (this.indexOfFirstFieldBinding == 1
      && methodScope.enclosingSourceType() == fieldBinding.original().declaringClass
      && methodScope.lastVisibleFieldID >= 0
      && fieldBinding.id >= methodScope.lastVisibleFieldID
      && (!fieldBinding.isStatic() || methodScope.isStatic)) {
    scope.problemReporter().forwardReference(this, 0, methodScope.enclosingSourceType());
  }
View Full Code Here

  if (this.indexOfFirstFieldBinding == 1
      && methodScope.enclosingSourceType() == fieldBinding.original().declaringClass
      && methodScope.lastVisibleFieldID >= 0
      && fieldBinding.id >= methodScope.lastVisibleFieldID
      && (!fieldBinding.isStatic() || methodScope.isStatic)) {
    scope.problemReporter().forwardReference(this, 0, methodScope.enclosingSourceType());
  }
  this.bits &= ~ASTNode.RestrictiveFlagMASK; // clear bits
  this.bits |= Binding.FIELD;
  return getOtherFieldBindings(scope);
}
View Full Code Here

        if (this.binding instanceof FieldBinding) {
          FieldBinding fieldBinding = (FieldBinding) this.binding;
          MethodScope methodScope = scope.methodScope();
          // check for forward references
          if (this.indexOfFirstFieldBinding == 1
              && methodScope.enclosingSourceType() == fieldBinding.original().declaringClass
              && methodScope.lastVisibleFieldID >= 0
              && fieldBinding.id >= methodScope.lastVisibleFieldID
              && (!fieldBinding.isStatic() || methodScope.isStatic)) {
            scope.problemReporter().forwardReference(this, 0, methodScope.enclosingSourceType());
          }
View Full Code Here

          if (this.indexOfFirstFieldBinding == 1
              && methodScope.enclosingSourceType() == fieldBinding.original().declaringClass
              && methodScope.lastVisibleFieldID >= 0
              && fieldBinding.id >= methodScope.lastVisibleFieldID
              && (!fieldBinding.isStatic() || methodScope.isStatic)) {
            scope.problemReporter().forwardReference(this, 0, methodScope.enclosingSourceType());
          }
          if (!fieldBinding.isStatic()
              && this.indexOfFirstFieldBinding == 1
              && scope.compilerOptions().getSeverity(CompilerOptions.UnqualifiedFieldAccess) != ProblemSeverities.Ignore) {
            scope.problemReporter().unqualifiedFieldAccess(this, fieldBinding);
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.