Package org.eclipse.jdt.internal.compiler.lookup

Examples of org.eclipse.jdt.internal.compiler.lookup.Binding.kind()


              if (binding instanceof org.eclipse.jdt.internal.compiler.lookup.TypeBinding) {
                ITypeBinding typeBinding = this.getTypeBinding((org.eclipse.jdt.internal.compiler.lookup.TypeBinding) binding);
                return typeBinding == null ? null : typeBinding;
              }
            } else {
              if ((binding.kind() & Binding.PACKAGE) != 0) {
                IPackageBinding packageBinding = getPackageBinding((org.eclipse.jdt.internal.compiler.lookup.PackageBinding) binding);
                if (packageBinding == null) {
                  return null;
                }
                return packageBinding;
View Full Code Here


      ImportBinding importBinding = importBindings[i];
      if(importBinding.isValidBinding() && importBinding.isStatic()) {
        Binding binding = importBinding.resolvedImport;
        if(binding != null && binding.isValidBinding()) {
          if(importBinding.onDemand) {
            if((binding.kind() & Binding.TYPE) != 0) {
              searchVisibleFields(
                  (ReferenceBinding)binding,
                  scope,
                  invocationSite,
                  scope,
View Full Code Here

                  staticsOnly,
                  notInJavadoc,
                  methodsFound);
            }
          } else {
            if ((binding.kind() & Binding.FIELD) != 0) {
              searchVisibleFields(
                  new FieldBinding[]{(FieldBinding)binding},
                  ((FieldBinding)binding).declaringClass,
                  scope,
                  invocationSite,
View Full Code Here

                  invocationSite,
                  scope,
                  staticsOnly,
                  localsFound,
                  fieldsFound);
            } else if ((binding.kind() & Binding.METHOD) != 0) {
              MethodBinding methodBinding = (MethodBinding)binding;

              searchVisibleLocalMethods(
                  methodBinding.declaringClass.getMethods(methodBinding.selector),
                  methodBinding.declaringClass,
View Full Code Here

              if (currentExpression instanceof NullLiteral) {
                scope.problemReporter().annotationValueMustBeConstant(this.binding.declaringClass, this.name, currentExpression, true);
              } else if (currentExpression instanceof NameReference) {
                NameReference nameReference = (NameReference) currentExpression;
                final Binding nameReferenceBinding = nameReference.binding;
                if (nameReferenceBinding.kind() == Binding.FIELD) {
                  FieldBinding fieldBinding = (FieldBinding) nameReferenceBinding;
                  if (!fieldBinding.declaringClass.isEnum()) {
                    scope.problemReporter().annotationValueMustBeConstant(this.binding.declaringClass, this.name, currentExpression, true);
                  }
                }
View Full Code Here

            }
          }
        } else if (this.value instanceof NameReference) {
          NameReference nameReference = (NameReference) this.value;
          final Binding nameReferenceBinding = nameReference.binding;
          if (nameReferenceBinding.kind() == Binding.FIELD) {
            FieldBinding fieldBinding = (FieldBinding) nameReferenceBinding;
            if (!fieldBinding.declaringClass.isEnum()) {
              if (!fieldBinding.type.isArrayType()) {
                scope.problemReporter().annotationValueMustBeConstant(this.binding.declaringClass, this.name, this.value, true);
              } else {
View Full Code Here

              if (binding instanceof org.eclipse.jdt.internal.compiler.lookup.TypeBinding) {
                ITypeBinding typeBinding = this.getTypeBinding((org.eclipse.jdt.internal.compiler.lookup.TypeBinding) binding);
                return typeBinding == null ? null : typeBinding;
              }
            } else {
              if ((binding.kind() & Binding.PACKAGE) != 0) {
                IPackageBinding packageBinding = getPackageBinding((org.eclipse.jdt.internal.compiler.lookup.PackageBinding) binding);
                if (packageBinding == null) {
                  return null;
                }
                return packageBinding;
View Full Code Here

              if (currentExpression instanceof NullLiteral) {
                scope.problemReporter().annotationValueMustBeConstant(this.binding.declaringClass, this.name, currentExpression, true);
              } else if (currentExpression instanceof NameReference) {
                NameReference nameReference = (NameReference) currentExpression;
                final Binding nameReferenceBinding = nameReference.binding;
                if (nameReferenceBinding.kind() == Binding.FIELD) {
                  FieldBinding fieldBinding = (FieldBinding) nameReferenceBinding;
                  if (!fieldBinding.declaringClass.isEnum()) {
                    scope.problemReporter().annotationValueMustBeConstant(this.binding.declaringClass, this.name, currentExpression, true);
                  }
                }
View Full Code Here

            }
          }
        } else if (this.value instanceof NameReference) {
          NameReference nameReference = (NameReference) this.value;
          final Binding nameReferenceBinding = nameReference.binding;
          if (nameReferenceBinding.kind() == Binding.FIELD) {
            FieldBinding fieldBinding = (FieldBinding) nameReferenceBinding;
            if (!fieldBinding.declaringClass.isEnum()) {
              if (!fieldBinding.type.isArrayType()) {
                scope.problemReporter().annotationValueMustBeConstant(this.binding.declaringClass, this.name, this.value, true);
              } else {
View Full Code Here

        }
        if (!(b1 instanceof TypeBinding) || !(b2 instanceof TypeBinding)) {
            // package, method, import, etc.
            return false;
        }
        if (b1.kind() == Binding.BASE_TYPE || b2.kind() == Binding.BASE_TYPE) {
            if (b1.kind() != b2.kind()) {
                return false;
            }
            else {
                // for primitives, compatibility implies subtype
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.