public TypeBinding resolveType(BlockScope scope) { // implicit this this.constant = Constant.NotAConstant; ReferenceBinding snippetType = scope.enclosingSourceType(); MethodScope methodScope = scope.methodScope(); if (!this.isImplicit && !checkAccess(scope, snippetType)) { return null; } this.delegateThis = scope.getField(snippetType, DELEGATE_THIS, this); if (this.delegateThis == null || !this.delegateThis.isValidBinding()) { // should not happen // if this happen we should report illegal access to this in a static context methodScope.problemReporter().errorThisSuperInStatic(this); return null; } return this.resolvedType = this.delegateThis.type; }
@Override public TypeBinding resolveType(BlockScope scope) { // implicit this this.constant = Constant.NotAConstant; ReferenceBinding snippetType = scope.enclosingSourceType(); MethodScope methodScope = scope.methodScope(); if (!this.isImplicit && !checkAccess(scope, snippetType)) { return null; } this.delegateThis = scope.getField(snippetType, DELEGATE_THIS, this); if (this.delegateThis == null || !this.delegateThis.isValidBinding()) { // should not happen // if this happen we should report illegal access to this in a static context methodScope.problemReporter().errorThisSuperInStatic(this); return null; } return this.resolvedType = this.delegateThis.type; }
public TypeBinding resolveType(BlockScope scope) { // implicit this this.constant = Constant.NotAConstant; ReferenceBinding snippetType = scope.enclosingSourceType(); MethodScope methodScope = scope.methodScope(); if (!this.isImplicit && !checkAccess(scope, snippetType)) { return null; } this.delegateThis = scope.getField(snippetType, DELEGATE_THIS, this); if (this.delegateThis == null || !this.delegateThis.isValidBinding()) { // should not happen // if this happen we should report illegal access to this in a static context methodScope.problemReporter().errorThisSuperInStatic(this); return null; } return this.resolvedType = this.delegateThis.type; }
public TypeBinding resolveType(BlockScope scope) { // implicit this this.constant = Constant.NotAConstant; ReferenceBinding snippetType = scope.enclosingSourceType(); MethodScope methodScope = scope.methodScope(); if (!this.isImplicit && !checkAccess(scope, snippetType)) { return null; } this.delegateThis = scope.getField(snippetType, DELEGATE_THIS, this); if (this.delegateThis == null || !this.delegateThis.isValidBinding()) { // should not happen // if this happen we should report illegal access to this in a static context methodScope.problemReporter().errorThisSuperInStatic(this); return null; } return this.resolvedType = this.delegateThis.type; }
public TypeBinding resolveType(BlockScope scope) { // implicit this this.constant = Constant.NotAConstant; ReferenceBinding snippetType = scope.enclosingSourceType(); MethodScope methodScope = scope.methodScope(); if (!this.isImplicit && !checkAccess(scope, snippetType)) { return null; } this.delegateThis = scope.getField(snippetType, DELEGATE_THIS, this); if (this.delegateThis == null || !this.delegateThis.isValidBinding()) { // should not happen // if this happen we should report illegal access to this in a static context methodScope.problemReporter().errorThisSuperInStatic(this); return null; } return this.resolvedType = this.delegateThis.type; }
public TypeBinding resolveType(BlockScope scope) { // implicit this this.constant = Constant.NotAConstant; TypeBinding snippetType = null; MethodScope methodScope = scope.methodScope(); if (!this.isImplicit && !checkAccess(methodScope)) { return null; } snippetType = scope.enclosingSourceType(); this.delegateThis = scope.getField(snippetType, DELEGATE_THIS, this); if (this.delegateThis == null || !this.delegateThis.isValidBinding()) { // should not happen // if this happen we should report illegal access to this in a static context methodScope.problemReporter().errorThisSuperInStatic(this); return null; } return this.resolvedType = this.delegateThis.type; }
public TypeBinding resolveType(BlockScope scope) { super.resolveType(scope); // tolerate some error cases if (this.binding == null || !(this.binding.isValidBinding() || this.binding.problemId() == ProblemReasons.NotVisible || this.binding.problemId() == ProblemReasons.InheritedNameHidesEnclosingName || this.binding.problemId() == ProblemReasons.NonStaticReferenceInConstructorInvocation || this.binding.problemId() == ProblemReasons.NonStaticReferenceInStaticContext)) throw new SelectionNodeFound(); else throw new SelectionNodeFound(this.binding); } }
public TypeBinding resolveType(BlockScope scope) { super.resolveType(scope); // tolerate some error cases if (this.binding == null || !(this.binding.isValidBinding() || this.binding.problemId() == ProblemReasons.NotVisible || this.binding.problemId() == ProblemReasons.InheritedNameHidesEnclosingName || this.binding.problemId() == ProblemReasons.NonStaticReferenceInConstructorInvocation || this.binding.problemId() == ProblemReasons.NonStaticReferenceInStaticContext)) throw new SelectionNodeFound(); else throw new SelectionNodeFound(this.binding); } }
public TypeBinding resolveType(BlockScope scope) { super.resolveType(scope); // tolerate some error cases if (this.binding == null || !(this.binding.isValidBinding() || this.binding.problemId() == ProblemReasons.NotVisible || this.binding.problemId() == ProblemReasons.InheritedNameHidesEnclosingName || this.binding.problemId() == ProblemReasons.NonStaticReferenceInConstructorInvocation || this.binding.problemId() == ProblemReasons.NonStaticReferenceInStaticContext)) throw new SelectionNodeFound(); else throw new SelectionNodeFound(this.binding); } }
public TypeBinding resolveType(BlockScope scope) { super.resolveType(scope); // tolerate some error cases if (this.binding == null || !(this.binding.isValidBinding() || this.binding.problemId() == ProblemReasons.NotVisible || this.binding.problemId() == ProblemReasons.InheritedNameHidesEnclosingName || this.binding.problemId() == ProblemReasons.NonStaticReferenceInConstructorInvocation || this.binding.problemId() == ProblemReasons.NonStaticReferenceInStaticContext)) throw new SelectionNodeFound(); else throw new SelectionNodeFound(this.binding); } }
public TypeBinding resolveType(BlockScope scope) { super.resolveType(scope); // tolerate some error cases if (this.binding == null || !(this.binding.isValidBinding() || this.binding.problemId() == ProblemReasons.NotVisible || this.binding.problemId() == ProblemReasons.InheritedNameHidesEnclosingName || this.binding.problemId() == ProblemReasons.NonStaticReferenceInConstructorInvocation || this.binding.problemId() == ProblemReasons.NonStaticReferenceInStaticContext)) throw new SelectionNodeFound(); else throw new SelectionNodeFound(this.binding); } }
@Override public TypeBinding resolveType(BlockScope scope) { super.resolveType(scope); // tolerate some error cases if (this.binding == null || !(this.binding.isValidBinding() || this.binding.problemId() == ProblemReasons.NotVisible || this.binding.problemId() == ProblemReasons.InheritedNameHidesEnclosingName || this.binding.problemId() == ProblemReasons.NonStaticReferenceInConstructorInvocation || this.binding.problemId() == ProblemReasons.NonStaticReferenceInStaticContext)) throw new SelectionNodeFound(); else throw new SelectionNodeFound(this.binding); } }
return; if (this.binding != null && this.binding.isValidBinding()) { FieldBinding originalBinding = this.binding.original(); TypeBinding originalType = originalBinding.type;
return; if (this.binding != null && this.binding.isValidBinding()) { FieldBinding originalBinding = this.binding.original(); TypeBinding originalType = originalBinding.type;
return; if (this.binding != null && this.binding.isValidBinding()) { FieldBinding originalBinding = this.binding.original(); TypeBinding originalType = originalBinding.type;
return; if (this.binding != null && this.binding.isValidBinding()) { FieldBinding originalBinding = this.binding.original(); TypeBinding originalType = originalBinding.type;
return; if (this.binding != null && this.binding.isValidBinding()) { FieldBinding originalBinding = this.binding.original(); TypeBinding originalType = originalBinding.type;
public FlowInfo analyseCode(MethodScope initializationScope, FlowContext flowContext, FlowInfo flowInfo) { if (this.binding != null && !this.binding.isUsed() && this.binding.isOrEnclosedByPrivateType()) { if (!initializationScope.referenceCompilationUnit().compilationResult.hasSyntaxError) { initializationScope.problemReporter().unusedPrivateField(this); } } // cannot define static non-constant field inside nested class if (this.binding != null && this.binding.isValidBinding() && this.binding.isStatic() && this.binding.constant() == Constant.NotAConstant && this.binding.declaringClass.isNestedType() && !this.binding.declaringClass.isStatic()) { initializationScope.problemReporter().unexpectedStaticModifierForField( (SourceTypeBinding) this.binding.declaringClass, this); } if (this.initialization != null) { flowInfo = this.initialization .analyseCode(initializationScope, flowContext, flowInfo) .unconditionalInits(); flowInfo.markAsDefinitelyAssigned(this.binding); } return flowInfo; }
public FlowInfo analyseCode(MethodScope initializationScope, FlowContext flowContext, FlowInfo flowInfo) { if (this.binding != null && !this.binding.isUsed() && this.binding.isOrEnclosedByPrivateType()) { if (!initializationScope.referenceCompilationUnit().compilationResult.hasSyntaxError) { initializationScope.problemReporter().unusedPrivateField(this); } } // cannot define static non-constant field inside nested class if (this.binding != null && this.binding.isValidBinding() && this.binding.isStatic() && this.binding.constant() == Constant.NotAConstant && this.binding.declaringClass.isNestedType() && !this.binding.declaringClass.isStatic()) { initializationScope.problemReporter().unexpectedStaticModifierForField( (SourceTypeBinding) this.binding.declaringClass, this); } if (this.initialization != null) { flowInfo = this.initialization .analyseCode(initializationScope, flowContext, flowInfo) .unconditionalInits(); flowInfo.markAsDefinitelyAssigned(this.binding); } return flowInfo; }
public FlowInfo analyseCode(MethodScope initializationScope, FlowContext flowContext, FlowInfo flowInfo) { if (this.binding != null && !this.binding.isUsed() && this.binding.isOrEnclosedByPrivateType()) { if (!initializationScope.referenceCompilationUnit().compilationResult.hasSyntaxError) { initializationScope.problemReporter().unusedPrivateField(this); } } // cannot define static non-constant field inside nested class if (this.binding != null && this.binding.isValidBinding() && this.binding.isStatic() && this.binding.constant() == Constant.NotAConstant && this.binding.declaringClass.isNestedType() && !this.binding.declaringClass.isStatic()) { initializationScope.problemReporter().unexpectedStaticModifierForField( (SourceTypeBinding) this.binding.declaringClass, this); } if (this.initialization != null) { flowInfo = this.initialization .analyseCode(initializationScope, flowContext, flowInfo) .unconditionalInits(); flowInfo.markAsDefinitelyAssigned(this.binding); } return flowInfo; }