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

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


    MethodBinding problemMethod = null;
    boolean searchForDefaultAbstractMethod = soureLevel18 || (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, APPLICABILITY);
        if (compatibleMethod != null) {
          if (compatibleMethod.isValidBinding()) {
            if (foundSize == 1 && compatibleMethod.canBeSeenBy(receiverType, invocationSite, this)) {
              // return the single visible match now
View Full Code Here


        findDefaultAbstractMethod(receiverType, selector, argumentTypes, invocationSite, classHierarchyStart, found, null);
      if (interfaceMethod != null) {
        if (soureLevel18 && foundSize > 0 && interfaceMethod.isVarargs() && interfaceMethod instanceof ParameterizedGenericMethodBinding) {
          MethodBinding original = interfaceMethod.original();
          for (int i = 0; i < foundSize; i++) {
            MethodBinding classMethod = (MethodBinding) found.elementAt(i);
            if (!classMethod.isAbstract()) { // this check shouldn't matter, but to compatible with javac...
              MethodBinding substitute = verifier.computeSubstituteMethod(original, classMethod);
              if (substitute != null && verifier.isSubstituteParameterSubsignature(classMethod, substitute))
                return new ProblemMethodBinding(interfaceMethod, selector, argumentTypes, ProblemReasons.ApplicableMethodOverriddenByInapplicable);
            }
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

            }
          }
        }
        if (visible != null) {
          if (visible.size == 1) {
            foundMethod = (MethodBinding) visible.elementAt(0);
          } else {
            MethodBinding[] temp = new MethodBinding[visible.size];
            visible.copyInto(temp);
            foundMethod = mostSpecificMethodBinding(temp, temp.length, argumentTypes, invocationSite, null);
          }
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.