if (!Binder.compareMethodSignatureAndName(method, candidates[0])) { throw Error.ambiguousMatch(); return (MethodInfo)Binder.findMostDerivedNewSlotMethod(candidates, candidates.length); return (MethodInfo)DefaultBinder.selectMethod(bindingFlags, candidates, parameterTypes);
static MethodBase findMostDerivedNewSlotMethod(final MethodBase[] match, final int cMatches) { int deepestHierarchy = 0; MethodBase methodWithDeepestHierarchy = null; for (int i = 0; i < cMatches; i++) { // Calculate the depth of the hierarchy of the declaring type of the // current method. final int currentHierarchyDepth = getHierarchyDepth(match[i].getDeclaringType()); // The two methods have the same name, signature, and hierarchy depth. // This can only happen if at least one is vararg or generic. if (currentHierarchyDepth == deepestHierarchy) { throw Error.ambiguousMatch(); } // Check to see if this method is on the most derived class. if (currentHierarchyDepth > deepestHierarchy) { deepestHierarchy = currentHierarchyDepth; methodWithDeepestHierarchy = match[i]; } } return methodWithDeepestHierarchy; }
static MethodBase findMostDerivedNewSlotMethod(final MethodBase[] match, final int cMatches) { int deepestHierarchy = 0; MethodBase methodWithDeepestHierarchy = null; for (int i = 0; i < cMatches; i++) { // Calculate the depth of the hierarchy of the declaring type of the // current method. final int currentHierarchyDepth = getHierarchyDepth(match[i].getDeclaringType()); // The two methods have the same name, signature, and hierarchy depth. // This can only happen if at least one is vararg or generic. if (currentHierarchyDepth == deepestHierarchy) { throw Error.ambiguousMatch(); } // Check to see if this method is on the most derived class. if (currentHierarchyDepth > deepestHierarchy) { deepestHierarchy = currentHierarchyDepth; methodWithDeepestHierarchy = match[i]; } } return methodWithDeepestHierarchy; }
if (!Binder.compareMethodSignatureAndName(constructor, candidates[0])) { throw Error.ambiguousMatch(); return (ConstructorInfo) Binder.findMostDerivedNewSlotMethod(candidates, candidates.length); return (ConstructorInfo) DefaultBinder.selectMethod(bindingFlags, candidates, parameterTypes);
static MethodBase findMostDerivedNewSlotMethod(final MethodBase[] match, final int cMatches) { int deepestHierarchy = 0; MethodBase methodWithDeepestHierarchy = null; for (int i = 0; i < cMatches; i++) { // Calculate the depth of the hierarchy of the declaring type of the // current method. final int currentHierarchyDepth = getHierarchyDepth(match[i].getDeclaringType()); // The two methods have the same name, signature, and hierarchy depth. // This can only happen if at least one is vararg or generic. if (currentHierarchyDepth == deepestHierarchy) { throw Error.ambiguousMatch(); } // Check to see if this method is on the most derived class. if (currentHierarchyDepth > deepestHierarchy) { deepestHierarchy = currentHierarchyDepth; methodWithDeepestHierarchy = match[i]; } } return methodWithDeepestHierarchy; }
if (!Binder.compareMethodSignatureAndName(constructor, candidates[0])) { throw Error.ambiguousMatch(); return (ConstructorInfo)Binder.findMostDerivedNewSlotMethod(candidates, candidates.length); return (ConstructorInfo)DefaultBinder.selectMethod(bindingFlags, candidates, parameterTypes);
if (!Binder.compareMethodSignatureAndName(method, candidates[0])) { throw Error.ambiguousMatch(); return (MethodInfo) Binder.findMostDerivedNewSlotMethod(candidates, candidates.length); return (MethodInfo) DefaultBinder.selectMethod(bindingFlags, candidates, parameterTypes);
if (!Binder.compareMethodSignatureAndName(method, candidates[0])) { throw Error.ambiguousMatch(); return (MethodInfo)Binder.findMostDerivedNewSlotMethod(candidates, candidates.length); return (MethodInfo)DefaultBinder.selectMethod(bindingFlags, candidates, parameterTypes);
if (!Binder.compareMethodSignatureAndName(constructor, candidates[0])) { throw Error.ambiguousMatch(); return (ConstructorInfo)Binder.findMostDerivedNewSlotMethod(candidates, candidates.length); return (ConstructorInfo)DefaultBinder.selectMethod(bindingFlags, candidates, parameterTypes);