public boolean checkAccess(BlockScope scope, ReferenceBinding receiverType) { MethodScope methodScope = scope.methodScope(); // this/super cannot be used in constructor call if (methodScope.isConstructorCall) { methodScope.problemReporter().fieldsOrThisBeforeConstructorInvocation(this); return false; } // static may not refer to this/super if (methodScope.isStatic) { methodScope.problemReporter().errorThisSuperInStatic(this); return false; } else if (this.isUnqualifiedSuper()) { TypeDeclaration type = methodScope.referenceType(); if (type != null && TypeDeclaration.kind(type.modifiers) == TypeDeclaration.INTERFACE_DECL) { methodScope.problemReporter().errorNoSuperInInterface(this); return false; } } if (receiverType != null) scope.tagAsAccessingEnclosingInstanceStateOf(receiverType, false /* type variable access */); return true; }
public boolean checkAccess(BlockScope scope, ReferenceBinding receiverType) { MethodScope methodScope = scope.methodScope(); // this/super cannot be used in constructor call if (methodScope.isConstructorCall) { methodScope.problemReporter().fieldsOrThisBeforeConstructorInvocation(this); return false; } // static may not refer to this/super if (methodScope.isStatic) { methodScope.problemReporter().errorThisSuperInStatic(this); return false; } else if (this.isUnqualifiedSuper()) { TypeDeclaration type = methodScope.referenceType(); if (type != null && TypeDeclaration.kind(type.modifiers) == TypeDeclaration.INTERFACE_DECL) { methodScope.problemReporter().errorNoSuperInInterface(this); return false; } } if (receiverType != null) scope.tagAsAccessingEnclosingInstanceStateOf(receiverType, false /* type variable access */); return true; }
public boolean checkAccess(BlockScope scope, ReferenceBinding receiverType) { MethodScope methodScope = scope.methodScope(); // this/super cannot be used in constructor call if (methodScope.isConstructorCall) { methodScope.problemReporter().fieldsOrThisBeforeConstructorInvocation(this); return false; } // static may not refer to this/super if (methodScope.isStatic) { methodScope.problemReporter().errorThisSuperInStatic(this); return false; } else if (this.isUnqualifiedSuper()) { TypeDeclaration type = methodScope.referenceType(); if (type != null && TypeDeclaration.kind(type.modifiers) == TypeDeclaration.INTERFACE_DECL) { methodScope.problemReporter().errorNoSuperInInterface(this); return false; } } if (receiverType != null) scope.tagAsAccessingEnclosingInstanceStateOf(receiverType, false /* type variable access */); return true; }
public boolean checkAccess(BlockScope scope, ReferenceBinding receiverType) { MethodScope methodScope = scope.methodScope(); // this/super cannot be used in constructor call if (methodScope.isConstructorCall) { methodScope.problemReporter().fieldsOrThisBeforeConstructorInvocation(this); return false; } // static may not refer to this/super if (methodScope.isStatic) { methodScope.problemReporter().errorThisSuperInStatic(this); return false; } else if (this.isUnqualifiedSuper()) { TypeDeclaration type = methodScope.referenceType(); if (type != null && TypeDeclaration.kind(type.modifiers) == TypeDeclaration.INTERFACE_DECL) { methodScope.problemReporter().errorNoSuperInInterface(this); return false; } } if (receiverType != null) scope.tagAsAccessingEnclosingInstanceStateOf(receiverType, false /* type variable access */); return true; }
public boolean checkAccess(BlockScope scope, ReferenceBinding receiverType) { MethodScope methodScope = scope.methodScope(); // this/super cannot be used in constructor call if (methodScope.isConstructorCall) { methodScope.problemReporter().fieldsOrThisBeforeConstructorInvocation(this); return false; } // static may not refer to this/super if (methodScope.isStatic) { methodScope.problemReporter().errorThisSuperInStatic(this); return false; } else if (this.isUnqualifiedSuper()) { TypeDeclaration type = methodScope.referenceType(); if (type != null && TypeDeclaration.kind(type.modifiers) == TypeDeclaration.INTERFACE_DECL) { methodScope.problemReporter().errorNoSuperInInterface(this); return false; } } if (receiverType != null) scope.tagAsAccessingEnclosingInstanceStateOf(receiverType, false /* type variable access */); return true; }
public boolean checkAccess(BlockScope scope, ReferenceBinding receiverType) { MethodScope methodScope = scope.methodScope(); // this/super cannot be used in constructor call if (methodScope.isConstructorCall) { methodScope.problemReporter().fieldsOrThisBeforeConstructorInvocation(this); return false; } // static may not refer to this/super if (methodScope.isStatic) { methodScope.problemReporter().errorThisSuperInStatic(this); return false; } else if (this.isUnqualifiedSuper()) { TypeDeclaration type = methodScope.referenceType(); if (type != null && TypeDeclaration.kind(type.modifiers) == TypeDeclaration.INTERFACE_DECL) { methodScope.problemReporter().errorNoSuperInInterface(this); return false; } } if (receiverType != null) scope.tagAsAccessingEnclosingInstanceStateOf(receiverType, false /* type variable access */); return true; }
public boolean checkAccess(BlockScope scope, ReferenceBinding receiverType) { MethodScope methodScope = scope.methodScope(); // this/super cannot be used in constructor call if (methodScope.isConstructorCall) { methodScope.problemReporter().fieldsOrThisBeforeConstructorInvocation(this); return false; } // static may not refer to this/super if (methodScope.isStatic) { methodScope.problemReporter().errorThisSuperInStatic(this); return false; } else if (this.isUnqualifiedSuper()) { TypeDeclaration type = methodScope.referenceType(); if (type != null && TypeDeclaration.kind(type.modifiers) == TypeDeclaration.INTERFACE_DECL) { methodScope.problemReporter().errorNoSuperInInterface(this); return false; } } if (receiverType != null) scope.tagAsAccessingEnclosingInstanceStateOf(receiverType, false /* type variable access */); return true; }
public boolean checkAccess(BlockScope scope, ReferenceBinding receiverType) { MethodScope methodScope = scope.methodScope(); // this/super cannot be used in constructor call if (methodScope.isConstructorCall) { methodScope.problemReporter().fieldsOrThisBeforeConstructorInvocation(this); return false; } // static may not refer to this/super if (methodScope.isStatic) { methodScope.problemReporter().errorThisSuperInStatic(this); return false; } else if (this.isUnqualifiedSuper()) { TypeDeclaration type = methodScope.referenceType(); if (type != null && TypeDeclaration.kind(type.modifiers) == TypeDeclaration.INTERFACE_DECL) { methodScope.problemReporter().errorNoSuperInInterface(this); return false; } } if (receiverType != null) scope.tagAsAccessingEnclosingInstanceStateOf(receiverType, false /* type variable access */); return true; }