public class LookupOverride extends MethodOverride
Methods eligible for lookup override must not have arguments.
| Constructor and Description |
|---|
LookupOverride(java.lang.reflect.Method method,
java.lang.String beanName)
Construct a new LookupOverride.
|
LookupOverride(java.lang.String methodName,
java.lang.String beanName)
Construct a new LookupOverride.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other) |
java.lang.String |
getBeanName()
Return the name of the bean that should be returned by this method.
|
int |
hashCode() |
boolean |
matches(java.lang.reflect.Method method)
Match the specified method by
Method reference or method name. |
java.lang.String |
toString() |
getMethodName, getSource, isOverloaded, setOverloaded, setSourcepublic LookupOverride(java.lang.String methodName,
@Nullable
java.lang.String beanName)
methodName - the name of the method to overridebeanName - the name of the bean in the current BeanFactory
that the overridden method should return (may be null)public LookupOverride(java.lang.reflect.Method method,
@Nullable
java.lang.String beanName)
method - the method to overridebeanName - the name of the bean in the current BeanFactory
that the overridden method should return (may be null)@Nullable public java.lang.String getBeanName()
public boolean matches(java.lang.reflect.Method method)
Method reference or method name.
For backwards compatibility reasons, in a scenario with overloaded non-abstract methods of the given name, only the no-arg variant of a method will be turned into a container-driven lookup method.
In case of a provided Method, only straight matches will
be considered, usually demarcated by the @Lookup annotation.
matches in class MethodOverridemethod - the method to checkpublic boolean equals(java.lang.Object other)
equals in class MethodOverridepublic int hashCode()
hashCode in class MethodOverridepublic java.lang.String toString()
toString in class java.lang.Object