/** * Answer the reference type of this scope. * It is the nearest enclosing type of this scope. */ @Override public TypeDeclaration referenceType() { ClassScope scope = enclosingClassScope(); return scope == null ? null : scope.referenceContext; }
/** * Answer the reference type of this scope. * It is the nearest enclosing type of this scope. */ public TypeDeclaration referenceType() { ClassScope scope = enclosingClassScope(); return scope == null ? null : scope.referenceContext; }
/** * Answer the reference type of this scope. * It is the nearest enclosing type of this scope. */ public TypeDeclaration referenceType() { ClassScope scope = enclosingClassScope(); return scope == null ? null : scope.referenceContext; }
/** * Answer the reference type of this scope. * It is the nearest enclosing type of this scope. */ public TypeDeclaration referenceType() { ClassScope scope = enclosingClassScope(); return scope == null ? null : scope.referenceContext; }
/** * Answer the reference type of this scope. * It is the nearest enclosing type of this scope. */ public TypeDeclaration referenceType() { ClassScope scope = enclosingClassScope(); return scope == null ? null : scope.referenceContext; }
/** * Answer the reference type of this scope. * It is the nearest enclosing type of this scope. */ public TypeDeclaration referenceType() { ClassScope scope = enclosingClassScope(); return scope == null ? null : scope.referenceContext; }
/** * Answer the reference type of this scope. * It is the nearest enclosing type of this scope. */ public TypeDeclaration referenceType() { ClassScope scope = enclosingClassScope(); return scope == null ? null : scope.referenceContext; }
/** * Answer the reference type of this scope. * It is the nearest enclosing type of this scope. */ public TypeDeclaration referenceType() { ClassScope scope = enclosingClassScope(); return scope == null ? null : scope.referenceContext; }
public void resetEnclosingMethodStaticFlag() { MethodScope methodScope = methodScope(); while (methodScope != null && methodScope.referenceContext instanceof MethodDeclaration) { MethodDeclaration methodDeclaration= (MethodDeclaration) methodScope.referenceContext; methodDeclaration.bits &= ~ASTNode.CanBeStatic; ClassScope enclosingClassScope = methodScope.enclosingClassScope(); if (enclosingClassScope != null) { methodScope = enclosingClassScope.methodScope(); } else { break; } } } }
/** * This method is used to reset the CanBeStatic on all enclosing methods until the method * belonging to the declaringClass * @param declaringClass */ public void resetDeclaringClassMethodStaticFlag(TypeBinding declaringClass) { MethodScope methodScope = methodScope(); if (methodScope != null && methodScope.referenceContext instanceof TypeDeclaration) { // anonymous type, find enclosing method methodScope = methodScope.enclosingMethodScope(); } while (methodScope != null && methodScope.referenceContext instanceof MethodDeclaration) { MethodDeclaration methodDeclaration = (MethodDeclaration) methodScope.referenceContext; methodDeclaration.bits &= ~ASTNode.CanBeStatic; ClassScope enclosingClassScope = methodScope.enclosingClassScope(); if (enclosingClassScope != null) { TypeDeclaration type = enclosingClassScope.referenceContext; if (type != null && type.binding != null && declaringClass != null && type.binding != declaringClass.original()) { methodScope = enclosingClassScope.enclosingMethodScope(); } else { break; } } else { break; } } }
public void resolveJavadoc(MethodScope initializationScope) { if (this.javadoc != null) { FieldBinding previousField = initializationScope.initializedField; int previousFieldID = initializationScope.lastVisibleFieldID; try { initializationScope.initializedField = this.binding; if (this.binding != null) initializationScope.lastVisibleFieldID = this.binding.id; this.javadoc.resolve(initializationScope); } finally { initializationScope.initializedField = previousField; initializationScope.lastVisibleFieldID = previousFieldID; } } else if (this.binding != null && this.binding.declaringClass != null && !this.binding.declaringClass.isLocalType()) { // Set javadoc visibility int javadocVisibility = this.binding.modifiers & ExtraCompilerModifiers.AccVisibilityMASK; ProblemReporter reporter = initializationScope.problemReporter(); int severity = reporter.computeSeverity(IProblem.JavadocMissing); if (severity != ProblemSeverities.Ignore) { ClassScope classScope = initializationScope.enclosingClassScope(); if (classScope != null) { javadocVisibility = Util.computeOuterMostVisibility(classScope.referenceType(), javadocVisibility); } int javadocModifiers = (this.binding.modifiers & ~ExtraCompilerModifiers.AccVisibilityMASK) | javadocVisibility; reporter.javadocMissing(this.sourceStart, this.sourceEnd, severity, javadocModifiers); } } }
methodDeclaration.bits &= ~ASTNode.CanBeStatic; ClassScope enclosingClassScope = methodScope.enclosingClassScope(); if (enclosingClassScope != null) { TypeDeclaration type = enclosingClassScope.referenceContext;
methodDeclaration.bits &= ~ASTNode.CanBeStatic; ClassScope enclosingClassScope = methodScope.enclosingClassScope(); if (enclosingClassScope != null) { TypeDeclaration type = enclosingClassScope.referenceContext;
methodDeclaration.bits &= ~ASTNode.CanBeStatic; ClassScope enclosingClassScope = methodScope.enclosingClassScope(); if (enclosingClassScope != null) { TypeDeclaration type = enclosingClassScope.referenceContext;
methodDeclaration.bits &= ~ASTNode.CanBeStatic; ClassScope enclosingClassScope = methodScope.enclosingClassScope(); if (enclosingClassScope != null) { TypeDeclaration type = enclosingClassScope.referenceContext;
methodDeclaration.bits &= ~ASTNode.CanBeStatic; ClassScope enclosingClassScope = methodScope.enclosingClassScope(); if (enclosingClassScope != null) { TypeDeclaration type = enclosingClassScope.referenceContext;
methodDeclaration.bits &= ~ASTNode.CanBeStatic; ClassScope enclosingClassScope = methodScope.enclosingClassScope(); if (enclosingClassScope != null) { TypeDeclaration type = enclosingClassScope.referenceContext;
methodDeclaration.bits &= ~ASTNode.CanBeStatic; ClassScope enclosingClassScope = methodScope.enclosingClassScope(); if (enclosingClassScope != null) { TypeDeclaration type = enclosingClassScope.referenceContext;
methodDeclaration.bits &= ~ASTNode.CanBeStatic; ClassScope enclosingClassScope = methodScope.enclosingClassScope(); if (enclosingClassScope != null) { TypeDeclaration type = enclosingClassScope.referenceContext;
ClassScope classScope = initializationScope.enclosingClassScope();