public void createBinding(MethodScope scope, TypeBinding typeBinding) { if (this.binding == null) { // for default constructors and fake implementation of abstract methods this.binding = new LocalVariableBinding(this, typeBinding, this.modifiers, true /*isArgument*/); } else if (!this.binding.type.isValidBinding()) { AbstractMethodDeclaration methodDecl = scope.referenceMethod(); if (methodDecl != null) { MethodBinding methodBinding = methodDecl.binding; if (methodBinding != null) { methodBinding.tagBits |= TagBits.HasUnresolvedArguments; } } } resolveAnnotations(scope, this.annotations, this.binding); this.binding.declaration = this; }
public TypeBinding createBinding(MethodScope scope, TypeBinding typeBinding) { if (this.binding == null) { // for default constructors and fake implementation of abstract methods this.binding = new LocalVariableBinding(this, typeBinding, this.modifiers, scope); } else if (!this.binding.type.isValidBinding()) { AbstractMethodDeclaration methodDecl = scope.referenceMethod(); if (methodDecl != null) { MethodBinding methodBinding = methodDecl.binding; if (methodBinding != null) { methodBinding.tagBits |= TagBits.HasUnresolvedArguments; } } } if ((this.binding.tagBits & TagBits.AnnotationResolved) == 0) { resolveAnnotations(scope, this.annotations, this.binding, true); if (scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_8) { Annotation.isTypeUseCompatible(this.type, scope, this.annotations); scope.validateNullAnnotation(this.binding.tagBits, this.type, this.annotations); } } this.binding.declaration = this; return this.binding.type; // might have been updated during resolveAnnotations (for typeAnnotations) }
public TypeBinding createBinding(MethodScope scope, TypeBinding typeBinding) { if (this.binding == null) { // for default constructors and fake implementation of abstract methods this.binding = new LocalVariableBinding(this, typeBinding, this.modifiers, scope); } else if (!this.binding.type.isValidBinding()) { AbstractMethodDeclaration methodDecl = scope.referenceMethod(); if (methodDecl != null) { MethodBinding methodBinding = methodDecl.binding; if (methodBinding != null) { methodBinding.tagBits |= TagBits.HasUnresolvedArguments; } } } if ((this.binding.tagBits & TagBits.AnnotationResolved) == 0) { resolveAnnotations(scope, this.annotations, this.binding, true); if (scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_8) { Annotation.isTypeUseCompatible(this.type, scope, this.annotations); scope.validateNullAnnotation(this.binding.tagBits, this.type, this.annotations); } } this.binding.declaration = this; return this.binding.type; // might have been updated during resolveAnnotations (for typeAnnotations) }
public TypeBinding createBinding(MethodScope scope, TypeBinding typeBinding) { if (this.binding == null) { // for default constructors and fake implementation of abstract methods this.binding = new LocalVariableBinding(this, typeBinding, this.modifiers, scope); } else if (!this.binding.type.isValidBinding()) { AbstractMethodDeclaration methodDecl = scope.referenceMethod(); if (methodDecl != null) { MethodBinding methodBinding = methodDecl.binding; if (methodBinding != null) { methodBinding.tagBits |= TagBits.HasUnresolvedArguments; } } } if ((this.binding.tagBits & TagBits.AnnotationResolved) == 0) { resolveAnnotations(scope, this.annotations, this.binding, true); if (scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_8) { Annotation.isTypeUseCompatible(this.type, scope, this.annotations); scope.validateNullAnnotation(this.binding.tagBits, this.type, this.annotations); } } this.binding.declaration = this; return this.binding.type; // might have been updated during resolveAnnotations (for typeAnnotations) }
public TypeBinding createBinding(MethodScope scope, TypeBinding typeBinding) { if (this.binding == null) { // for default constructors and fake implementation of abstract methods this.binding = new LocalVariableBinding(this, typeBinding, this.modifiers, scope); } else if (!this.binding.type.isValidBinding()) { AbstractMethodDeclaration methodDecl = scope.referenceMethod(); if (methodDecl != null) { MethodBinding methodBinding = methodDecl.binding; if (methodBinding != null) { methodBinding.tagBits |= TagBits.HasUnresolvedArguments; } } } if ((this.binding.tagBits & TagBits.AnnotationResolved) == 0) { resolveAnnotations(scope, this.annotations, this.binding, true); if (scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_8) { Annotation.isTypeUseCompatible(this.type, scope, this.annotations); scope.validateNullAnnotation(this.binding.tagBits, this.type, this.annotations); } } this.binding.declaration = this; return this.binding.type; // might have been updated during resolveAnnotations (for typeAnnotations) }
public TypeBinding createBinding(MethodScope scope, TypeBinding typeBinding) { if (this.binding == null) { // for default constructors and fake implementation of abstract methods this.binding = new LocalVariableBinding(this, typeBinding, this.modifiers, scope); } else if (!this.binding.type.isValidBinding()) { AbstractMethodDeclaration methodDecl = scope.referenceMethod(); if (methodDecl != null) { MethodBinding methodBinding = methodDecl.binding; if (methodBinding != null) { methodBinding.tagBits |= TagBits.HasUnresolvedArguments; } } } if ((this.binding.tagBits & TagBits.AnnotationResolved) == 0) { resolveAnnotations(scope, this.annotations, this.binding, true); if (scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_8) { Annotation.isTypeUseCompatible(this.type, scope, this.annotations); scope.validateNullAnnotation(this.binding.tagBits, this.type, this.annotations); } } this.binding.declaration = this; return this.binding.type; // might have been updated during resolveAnnotations (for typeAnnotations) }
public TypeBinding createBinding(MethodScope scope, TypeBinding typeBinding) { if (this.binding == null) { // for default constructors and fake implementation of abstract methods this.binding = new LocalVariableBinding(this, typeBinding, this.modifiers, scope); } else if (!this.binding.type.isValidBinding()) { AbstractMethodDeclaration methodDecl = scope.referenceMethod(); if (methodDecl != null) { MethodBinding methodBinding = methodDecl.binding; if (methodBinding != null) { methodBinding.tagBits |= TagBits.HasUnresolvedArguments; } } } if ((this.binding.tagBits & TagBits.AnnotationResolved) == 0) { resolveAnnotations(scope, this.annotations, this.binding, true); if (scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_8) { Annotation.isTypeUseCompatible(this.type, scope, this.annotations); scope.validateNullAnnotation(this.binding.tagBits, this.type, this.annotations); } } this.binding.declaration = this; return this.binding.type; // might have been updated during resolveAnnotations (for typeAnnotations) }
public TypeBinding createBinding(MethodScope scope, TypeBinding typeBinding) { if (this.binding == null) { // for default constructors and fake implementation of abstract methods this.binding = new LocalVariableBinding(this, typeBinding, this.modifiers, scope); } else if (!this.binding.type.isValidBinding()) { AbstractMethodDeclaration methodDecl = scope.referenceMethod(); if (methodDecl != null) { MethodBinding methodBinding = methodDecl.binding; if (methodBinding != null) { methodBinding.tagBits |= TagBits.HasUnresolvedArguments; } } } if ((this.binding.tagBits & TagBits.AnnotationResolved) == 0) { resolveAnnotations(scope, this.annotations, this.binding, true); if (scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_8) { Annotation.isTypeUseCompatible(this.type, scope, this.annotations); scope.validateNullAnnotation(this.binding.tagBits, this.type, this.annotations); } } this.binding.declaration = this; return this.binding.type; // might have been updated during resolveAnnotations (for typeAnnotations) }
public TypeBinding createBinding(MethodScope scope, TypeBinding typeBinding) { if (this.binding == null) { // for default constructors and fake implementation of abstract methods this.binding = new LocalVariableBinding(this, typeBinding, this.modifiers, scope); } else if (!this.binding.type.isValidBinding()) { AbstractMethodDeclaration methodDecl = scope.referenceMethod(); if (methodDecl != null) { MethodBinding methodBinding = methodDecl.binding; if (methodBinding != null) { methodBinding.tagBits |= TagBits.HasUnresolvedArguments; } } } if ((this.binding.tagBits & TagBits.AnnotationResolved) == 0) { resolveAnnotations(scope, this.annotations, this.binding, true); if (scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_8) { Annotation.isTypeUseCompatible(this.type, scope, this.annotations); scope.validateNullAnnotation(this.binding.tagBits, this.type, this.annotations); } } this.binding.declaration = this; return this.binding.type; // might have been updated during resolveAnnotations (for typeAnnotations) }
public void bind(MethodScope scope, TypeBinding typeBinding, boolean used) { // record the resolved type into the type reference Binding existingVariable = scope.getBinding(this.name, Binding.VARIABLE, this, false /*do not resolve hidden field*/); if (existingVariable != null && existingVariable.isValidBinding()){ if (existingVariable instanceof LocalVariableBinding && this.hiddenVariableDepth == 0) { scope.problemReporter().redefineArgument(this); } else { boolean isSpecialArgument = false; if (existingVariable instanceof FieldBinding) { if (scope.isInsideConstructor()) { isSpecialArgument = true; // constructor argument } else { AbstractMethodDeclaration methodDecl = scope.referenceMethod(); if (methodDecl != null && CharOperation.prefixEquals(SET, methodDecl.selector)) { isSpecialArgument = true; // setter argument } } } scope.problemReporter().localVariableHiding(this, existingVariable, isSpecialArgument); } } if (this.binding == null) { this.binding = new LocalVariableBinding(this, typeBinding, this.modifiers, true); } scope.addLocalVariable(this.binding); resolveAnnotations(scope, this.annotations, this.binding); //true stand for argument instead of just local this.binding.declaration = this; this.binding.useFlag = used ? LocalVariableBinding.USED : LocalVariableBinding.UNUSED; }
resolveAnnotations(scope, this.annotations, this.binding);
this.binding = new CatchParameterBinding(this, exceptionType, this.modifiers, false); // argument decl, but local var (where isArgument = false) resolveAnnotations(scope, this.annotations, this.binding);
resolveAnnotations(scope, this.annotations, this.binding);
resolveAnnotations(scope, this.annotations, this.binding);
this.binding = new CatchParameterBinding(this, exceptionType, this.modifiers, false); // argument decl, but local var (where isArgument = false) resolveAnnotations(scope, this.annotations, this.binding, true); Annotation.isTypeUseCompatible(this.type, scope, this.annotations); if (this.type.resolvedType != null && this.type.resolvedType.hasNullTypeAnnotations()) {
this.binding = new CatchParameterBinding(this, exceptionType, this.modifiers, false); // argument decl, but local var (where isArgument = false) resolveAnnotations(scope, this.annotations, this.binding, true); Annotation.isTypeUseCompatible(this.type, scope, this.annotations); if (scope.compilerOptions().isAnnotationBasedNullAnalysisEnabled &&
this.binding = new CatchParameterBinding(this, exceptionType, this.modifiers, false); // argument decl, but local var (where isArgument = false) resolveAnnotations(scope, this.annotations, this.binding, true); Annotation.isTypeUseCompatible(this.type, scope, this.annotations); if (this.type.resolvedType != null && this.type.resolvedType.hasNullTypeAnnotations()) {
this.binding = new CatchParameterBinding(this, exceptionType, this.modifiers, false); // argument decl, but local var (where isArgument = false) resolveAnnotations(scope, this.annotations, this.binding, true); Annotation.isTypeUseCompatible(this.type, scope, this.annotations); if (scope.compilerOptions().isAnnotationBasedNullAnalysisEnabled &&
this.binding = new CatchParameterBinding(this, exceptionType, this.modifiers, false); // argument decl, but local var (where isArgument = false) resolveAnnotations(scope, this.annotations, this.binding, true); Annotation.isTypeUseCompatible(this.type, scope, this.annotations); if (scope.compilerOptions().isAnnotationBasedNullAnalysisEnabled &&
this.binding = new CatchParameterBinding(this, exceptionType, this.modifiers, false); // argument decl, but local var (where isArgument = false) resolveAnnotations(scope, this.annotations, this.binding, true); Annotation.isTypeUseCompatible(this.type, scope, this.annotations); if (scope.compilerOptions().isAnnotationBasedNullAnalysisEnabled &&