Package org.eclipse.jdt.internal.compiler.util

Examples of org.eclipse.jdt.internal.compiler.util.ObjectVector.elementAt()


            // protected method need to be checked only - default access is already dealt with in #canBeSeen implementation
            // when checking that p.C -> q.B -> p.A cannot see default access members from A through B.
            // if ((currentMethod.modifiers & AccProtected) == 0) continue nextMethod;
            // BUT we can also ignore any overridden method since we already know the better match (fixes 80028)
            for (int j = 0, max = found.size; j < max; j++) {
              MethodBinding matchingMethod = (MethodBinding) found.elementAt(j);
              MethodBinding matchingOriginal = matchingMethod.original();
              MethodBinding currentOriginal = matchingOriginal.findOriginalInheritedMethod(currentMethod);
              if (currentOriginal != null && verifier.isParameterSubsignature(matchingOriginal, currentOriginal)) {
                if (isCompliant15) {
                  if (matchingMethod.isBridge() && !currentMethod.isBridge())
View Full Code Here


    MethodBinding problemMethod = null;
    boolean searchForDefaultAbstractMethod = isCompliant14 && ! receiverTypeIsInterface && (receiverType.isAbstract() || receiverType.isTypeVariable());
    if (foundSize > 0) {
      // argument type compatibility check
      for (int i = 0; i < foundSize; i++) {
        MethodBinding methodBinding = (MethodBinding) found.elementAt(i);
        MethodBinding compatibleMethod = computeCompatibleMethod(methodBinding, argumentTypes, invocationSite);
        if (compatibleMethod != null) {
          if (compatibleMethod.isValidBinding()) {
            if (foundSize == 1 && compatibleMethod.canBeSeenBy(receiverType, invocationSite, this)) {
              // return the single visible match now
View Full Code Here

      // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=69471
      // bad guesses are foo(), when argument types have been supplied
      // and foo(X, Y), when the argument types are (int, float, Y)
      // so answer the method with the most argType matches and least parameter type mismatches
      int bestArgMatches = -1;
      MethodBinding bestGuess = (MethodBinding) found.elementAt(0); // if no good match so just use the first one found
      int argLength = argumentTypes.length;
      foundSize = found.size;
      nextMethod : for (int i = 0; i < foundSize; i++) {
        MethodBinding methodBinding = (MethodBinding) found.elementAt(i);
        TypeBinding[] params = methodBinding.parameters;
View Full Code Here

      int bestArgMatches = -1;
      MethodBinding bestGuess = (MethodBinding) found.elementAt(0); // if no good match so just use the first one found
      int argLength = argumentTypes.length;
      foundSize = found.size;
      nextMethod : for (int i = 0; i < foundSize; i++) {
        MethodBinding methodBinding = (MethodBinding) found.elementAt(i);
        TypeBinding[] params = methodBinding.parameters;
        int paramLength = params.length;
        int argMatches = 0;
        next: for (int a = 0; a < argLength; a++) {
          TypeBinding arg = argumentTypes[a];
View Full Code Here

            RootInfo rootInfo = (RootInfo) state.oldRoots.get(this.oldResolvedClasspath[i].getPath());
            if (rootInfo != null && rootInfo.cache != null) {
              IPackageFragmentRoot oldRoot = rootInfo.cache;
              boolean found = false;
              for (int j = 0; j < accumulatedRoots.size(); j++) {
                IPackageFragmentRoot root = (IPackageFragmentRoot) accumulatedRoots.elementAt(j);
                if (!root.getPath().equals(oldRoot.getPath())) {
                  found = true;
                  break;
                }
              }
View Full Code Here

            RootInfo rootInfo = (RootInfo) state.oldRoots.get(this.oldResolvedClasspath[i].getPath());
            if (rootInfo != null && rootInfo.cache != null) {
              IPackageFragmentRoot oldRoot = rootInfo.cache;
              boolean found = false;
              for (int j = 0; j < accumulatedRoots.size(); j++) {
                IPackageFragmentRoot root = (IPackageFragmentRoot) accumulatedRoots.elementAt(j);
                if (root.getPath().equals(oldRoot.getPath())) {
                  found = true;
                  break;
                }
              }
View Full Code Here

            // protected method need to be checked only - default access is already dealt with in #canBeSeen implementation
            // when checking that p.C -> q.B -> p.A cannot see default access members from A through B.
            // if ((currentMethod.modifiers & AccProtected) == 0) continue nextMethod;
            // BUT we can also ignore any overridden method since we already know the better match (fixes 80028)
            for (int j = 0, max = found.size; j < max; j++) {
              MethodBinding matchingMethod = (MethodBinding) found.elementAt(j);
              if (verifier.isParameterSubsignature(matchingMethod.original(), currentMethod.original())) {
                if (isCompliant15) {
                  if (matchingMethod.isBridge() && !currentMethod.isBridge())
                    continue nextMethod; // keep inherited methods to find concrete method over a bridge method
                }
View Full Code Here

    MethodBinding problemMethod = null;
    boolean searchForDefaultAbstractMethod = isCompliant14 && ! receiverTypeIsInterface && (receiverType.isAbstract() || receiverType.isTypeVariable());
    if (foundSize > 0) {
      // argument type compatibility check
      for (int i = 0; i < foundSize; i++) {
        MethodBinding methodBinding = (MethodBinding) found.elementAt(i);
        MethodBinding compatibleMethod = computeCompatibleMethod(methodBinding, argumentTypes, invocationSite);
        if (compatibleMethod != null) {
          if (compatibleMethod.isValidBinding()) {
            if (foundSize == 1 && compatibleMethod.canBeSeenBy(receiverType, invocationSite, this)) {
              // return the single visible match now
View Full Code Here

      // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=69471
      // bad guesses are foo(), when argument types have been supplied
      // and foo(X, Y), when the argument types are (int, float, Y)
      // so answer the method with the most argType matches and least parameter type mismatches
      int bestArgMatches = -1;
      MethodBinding bestGuess = (MethodBinding) found.elementAt(0); // if no good match so just use the first one found
      int argLength = argumentTypes.length;
      foundSize = found.size;
      nextMethod : for (int i = 0; i < foundSize; i++) {
        MethodBinding methodBinding = (MethodBinding) found.elementAt(i);
        TypeBinding[] params = methodBinding.parameters;
View Full Code Here

      int bestArgMatches = -1;
      MethodBinding bestGuess = (MethodBinding) found.elementAt(0); // if no good match so just use the first one found
      int argLength = argumentTypes.length;
      foundSize = found.size;
      nextMethod : for (int i = 0; i < foundSize; i++) {
        MethodBinding methodBinding = (MethodBinding) found.elementAt(i);
        TypeBinding[] params = methodBinding.parameters;
        int paramLength = params.length;
        int argMatches = 0;
        next: for (int a = 0; a < argLength; a++) {
          TypeBinding arg = argumentTypes[a];
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.