public static boolean isValid(/*@Nullable*/Binding binding) { return binding != null && binding.isValidBinding(); } public boolean isVolatile() {
public static boolean isValid(/*@Nullable*/Binding binding) { return binding != null && binding.isValidBinding(); } public boolean isVolatile() {
if (someBinding != null && someBinding.isValidBinding() && someBinding instanceof PackageBinding) { packageBinding = (PackageBinding) someBinding; } else {
private void internalResolve(Scope scope, boolean staticContext) { // detect variable/type name collisions if (this.binding != null) { Binding existingType = scope.parent.getBinding(this.name, Binding.TYPE, this, false/*do not resolve hidden field*/); if (existingType != null && this.binding != existingType && existingType.isValidBinding() && (existingType.kind() != Binding.TYPE_PARAMETER || !staticContext)) { scope.problemReporter().typeHiding(this, existingType); } } }
private void internalResolve(Scope scope, boolean staticContext) { // detect variable/type name collisions if (this.binding != null) { Binding existingType = scope.parent.getBinding(this.name, Binding.TYPE, this, false/*do not resolve hidden field*/); if (existingType != null && this.binding != existingType && existingType.isValidBinding() && (existingType.kind() != Binding.TYPE_PARAMETER || !staticContext)) { scope.problemReporter().typeHiding(this, existingType); } } }
private void internalResolve(Scope scope, boolean staticContext) { // detect variable/type name collisions if (this.binding != null) { Binding existingType = scope.parent.getBinding(this.name, Binding.TYPE, this, false/*do not resolve hidden field*/); if (existingType != null && this.binding != existingType && existingType.isValidBinding() && (existingType.kind() != Binding.TYPE_PARAMETER || !staticContext)) { scope.problemReporter().typeHiding(this, existingType); } } }
public TypeBinding resolveType(BlockScope scope) { if(this.type instanceof QualifiedTypeReference) { QualifiedTypeReference qualifiedTypeReference = (QualifiedTypeReference) this.type; Binding binding = scope.parent.getTypeOrPackage(qualifiedTypeReference.tokens); // step up from the ClassScope if (!binding.isValidBinding()) { scope.problemReporter().invalidType(this, (TypeBinding) binding); throw new CompletionNodeFound(); } throw new CompletionNodeFound(this, binding, scope); } throw new CompletionNodeFound(this, null, scope); } }
public TypeBinding resolveType(BlockScope scope) { if(this.type instanceof QualifiedTypeReference) { QualifiedTypeReference qualifiedTypeReference = (QualifiedTypeReference) this.type; Binding binding = scope.parent.getTypeOrPackage(qualifiedTypeReference.tokens); // step up from the ClassScope if (!binding.isValidBinding()) { scope.problemReporter().invalidType(this, (TypeBinding) binding); throw new CompletionNodeFound(); } throw new CompletionNodeFound(this, binding, scope); } throw new CompletionNodeFound(this, null, scope); } }
public TypeBinding resolveType(BlockScope scope) { if(this.type instanceof QualifiedTypeReference) { QualifiedTypeReference qualifiedTypeReference = (QualifiedTypeReference) this.type; Binding binding = scope.parent.getTypeOrPackage(qualifiedTypeReference.tokens); // step up from the ClassScope if (!binding.isValidBinding()) { scope.problemReporter().invalidType(this, (TypeBinding) binding); throw new CompletionNodeFound(); } throw new CompletionNodeFound(this, binding, scope); } throw new CompletionNodeFound(this, null, scope); } }
public TypeBinding resolveType(BlockScope scope) { if(this.type instanceof QualifiedTypeReference) { QualifiedTypeReference qualifiedTypeReference = (QualifiedTypeReference) this.type; Binding binding = scope.parent.getTypeOrPackage(qualifiedTypeReference.tokens); // step up from the ClassScope if (!binding.isValidBinding()) { scope.problemReporter().invalidType(this, (TypeBinding) binding); throw new CompletionNodeFound(); } throw new CompletionNodeFound(this, binding, scope); } throw new CompletionNodeFound(this, null, scope); } }
public TypeBinding resolveType(BlockScope scope) { if(this.type instanceof QualifiedTypeReference) { QualifiedTypeReference qualifiedTypeReference = (QualifiedTypeReference) this.type; Binding binding = scope.parent.getTypeOrPackage(qualifiedTypeReference.tokens); // step up from the ClassScope if (!binding.isValidBinding()) { scope.problemReporter().invalidType(this, (TypeBinding) binding); throw new CompletionNodeFound(); } throw new CompletionNodeFound(this, binding, scope); } throw new CompletionNodeFound(this, null, scope); } }
@Override public TypeBinding resolveType(BlockScope scope) { if(this.type instanceof QualifiedTypeReference) { QualifiedTypeReference qualifiedTypeReference = (QualifiedTypeReference) this.type; Binding binding = scope.parent.getTypeOrPackage(qualifiedTypeReference.tokens); // step up from the ClassScope if (!binding.isValidBinding()) { scope.problemReporter().invalidType(this, (TypeBinding) binding); throw new CompletionNodeFound(); } throw new CompletionNodeFound(this, binding, scope); } throw new CompletionNodeFound(this, null, scope); } }
protected TypeBinding getTypeBinding(Scope scope) { // it can be a package, type or member type Binding binding = scope.parent.getTypeOrPackage(this.tokens); // step up from the ClassScope if (!binding.isValidBinding()) { scope.problemReporter().invalidType(this, (TypeBinding) binding); if (binding.problemId() == ProblemReasons.NotFound) { throw new CompletionNodeFound(this, binding, scope); } throw new CompletionNodeFound(); } throw new CompletionNodeFound(this, binding, scope); } public boolean isClass(){
protected TypeBinding getTypeBinding(Scope scope) { // it can be a package, type or member type Binding binding = scope.parent.getTypeOrPackage(this.tokens); // step up from the ClassScope if (!binding.isValidBinding()) { scope.problemReporter().invalidType(this, (TypeBinding) binding); if (binding.problemId() == ProblemReasons.NotFound) { throw new CompletionNodeFound(this, binding, scope); } throw new CompletionNodeFound(); } throw new CompletionNodeFound(this, binding, scope); } public boolean isClass(){
protected TypeBinding getTypeBinding(Scope scope) { // it can be a package, type or member type Binding binding = scope.parent.getTypeOrPackage(this.tokens); // step up from the ClassScope if (!binding.isValidBinding()) { scope.problemReporter().invalidType(this, (TypeBinding) binding); if (binding.problemId() == ProblemReasons.NotFound) { throw new CompletionNodeFound(this, binding, scope); } throw new CompletionNodeFound(); } throw new CompletionNodeFound(this, binding, scope); } public boolean isClass(){
protected TypeBinding getTypeBinding(Scope scope) { // it can be a package, type or member type Binding binding = scope.parent.getTypeOrPackage(this.tokens); // step up from the ClassScope if (!binding.isValidBinding()) { scope.problemReporter().invalidType(this, (TypeBinding) binding); if (binding.problemId() == ProblemReasons.NotFound) { throw new CompletionNodeFound(this, binding, scope); } throw new CompletionNodeFound(); } throw new CompletionNodeFound(this, binding, scope); } public boolean isClass(){
protected TypeBinding getTypeBinding(Scope scope) { // it can be a package, type or member type Binding binding = scope.parent.getTypeOrPackage(this.tokens); // step up from the ClassScope if (!binding.isValidBinding()) { scope.problemReporter().invalidType(this, (TypeBinding) binding); if (binding.problemId() == ProblemReasons.NotFound) { throw new CompletionNodeFound(this, binding, scope); } throw new CompletionNodeFound(); } throw new CompletionNodeFound(this, binding, scope); } public boolean isClass(){
@Override protected TypeBinding getTypeBinding(Scope scope) { // it can be a package, type or member type Binding binding = scope.parent.getTypeOrPackage(this.tokens); // step up from the ClassScope if (!binding.isValidBinding()) { scope.problemReporter().invalidType(this, (TypeBinding) binding); if (binding.problemId() == ProblemReasons.NotFound) { throw new CompletionNodeFound(this, binding, scope); } throw new CompletionNodeFound(); } throw new CompletionNodeFound(this, binding, scope); } public boolean isClass(){
private void internalResolve(Scope scope, boolean staticContext) { // detect variable/type name collisions if (this.binding != null) { Binding existingType = scope.parent.getBinding(this.name, Binding.TYPE, this, false/*do not resolve hidden field*/); if (existingType != null && this.binding != existingType && existingType.isValidBinding() && (existingType.kind() != Binding.TYPE_PARAMETER || !staticContext)) { scope.problemReporter().typeHiding(this, existingType); } } if (this.annotations != null || scope.environment().usesNullTypeAnnotations()) { resolveAnnotations(scope); } }
protected TypeBinding getTypeBinding(Scope scope) { // it can be a package, type or member type Binding binding = scope.getTypeOrPackage(new char[][] {this.token}); if (!binding.isValidBinding()) { if (binding instanceof TypeBinding) { scope.problemReporter().invalidType(this, (TypeBinding) binding); } else if (binding instanceof PackageBinding) { ProblemReferenceBinding problemBinding = new ProblemReferenceBinding(((PackageBinding)binding).compoundName, null, binding.problemId()); scope.problemReporter().invalidType(this, problemBinding); } throw new SelectionNodeFound(); } throw new SelectionNodeFound(binding); } public StringBuffer printExpression(int indent, StringBuffer output) {