public class MethodUtils extends Object
Constructor and Description |
---|
MethodUtils() |
Modifier and Type | Method and Description |
---|---|
static Method |
getMethodInternal(Class<?> udfClass,
List<Method> mlist,
boolean exact,
List<TypeInfo> argumentsPassed)
Gets the closest matching method corresponding to the argument list from a
list of methods.
|
static <T> Method |
getMethodInternal(Class<? extends T> udfClass,
String methodName,
boolean exact,
List<TypeInfo> argumentClasses)
This method is shared between UDFRegistry and UDAFRegistry.
|
static int |
matchCost(TypeInfo argumentPassed,
TypeInfo argumentAccepted,
boolean exact)
Returns -1 if passed does not match accepted.
|
public static <T> Method getMethodInternal(Class<? extends T> udfClass, String methodName, boolean exact, List<TypeInfo> argumentClasses) throws UDFArgumentException
UDFArgumentException
public static Method getMethodInternal(Class<?> udfClass, List<Method> mlist, boolean exact, List<TypeInfo> argumentsPassed) throws UDFArgumentException
mlist
- The list of methods to inspect.exact
- Boolean to indicate whether this is an exact match or not.argumentsPassed
- The classes for the argument.UDFArgumentException
Copyright © 2023 The Apache Software Foundation. All rights reserved.