I - the input argument type for the resolved functionsR - the return type for the resolved functions@InterfaceAudience.Private public final class ReflectedFunctionCache<I,R> extends Object
getAndCallByName(String, Object) should have handling for null return values.
An instance is created for a specified baseClass (i.e. Filter), argClass (i.e. byte[]), and static methodName to call. These are used to resolve a Function which delegates to that static method, if it is found.
| Constructor and Description |
|---|
ReflectedFunctionCache(Class<R> baseClass,
Class<I> argClass,
String staticMethodName) |
| Modifier and Type | Method and Description |
|---|---|
R |
getAndCallByName(String className,
I argument)
Get and execute the Function for the given className, passing the argument to the function and
returning the result.
|
@Nullable public R getAndCallByName(String className, I argument)
className - the full name of the class to lookupargument - the argument to pass to the function, if found.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.