public final class MethodProvider
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
FallbackMethod |
getFallbackMethod(java.lang.Class<?> type,
java.lang.reflect.Method commandMethod) |
FallbackMethod |
getFallbackMethod(java.lang.Class<?> type,
java.lang.reflect.Method commandMethod,
boolean extended)
Gets fallback method for command method.
|
static MethodProvider |
getInstance() |
com.google.common.base.Optional<java.lang.reflect.Method> |
getMethod(java.lang.Class<?> type,
java.lang.String name,
java.lang.Class<?>... parameterTypes) |
java.lang.reflect.Method |
unbride(java.lang.reflect.Method bridgeMethod,
java.lang.Class<?> aClass)
Finds generic method for the given bridge method.
|
public static MethodProvider getInstance()
public FallbackMethod getFallbackMethod(java.lang.Class<?> type, java.lang.reflect.Method commandMethod)
public FallbackMethod getFallbackMethod(java.lang.Class<?> type, java.lang.reflect.Method commandMethod, boolean extended)
type - typecommandMethod - the command method. in the essence it can be a fallback
method annotated with HystrixCommand annotation that has a fallback as well.extended - true if the given commandMethod was derived using additional parameter, otherwise - falseFallbackMethod or FallbackMethod.ABSENT if there is no suitable fallback method for the given commandpublic com.google.common.base.Optional<java.lang.reflect.Method> getMethod(java.lang.Class<?> type,
java.lang.String name,
java.lang.Class<?>... parameterTypes)
public java.lang.reflect.Method unbride(java.lang.reflect.Method bridgeMethod,
java.lang.Class<?> aClass)
throws java.io.IOException,
java.lang.NoSuchMethodException,
java.lang.ClassNotFoundException
bridgeMethod - the bridge methodaClass - the type where the bridge method is declaredjava.io.IOExceptionjava.lang.NoSuchMethodExceptionjava.lang.ClassNotFoundException