spring-framework / org.springframework.beans.factory.support / LookupOverride

LookupOverride

open class LookupOverride : MethodOverride

Represents an override of a method that looks up an object in the same IoC context.

Methods eligible for lookup override must not have arguments.

Author
Rod Johnson

Author
Juergen Hoeller

Since
1.1

Constructors

<init>

LookupOverride(methodName: String, beanName: String)
LookupOverride(method: Method, beanName: String)

Construct a new LookupOverride.

Functions

equals

open fun equals(other: Any?): Boolean

getBeanName

open fun getBeanName(): String

Return the name of the bean that should be returned by this method.

hashCode

open fun hashCode(): Int

matches

open fun matches(method: Method): Boolean

Match the specified method by 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.

toString

open fun toString(): String