org.springframework.beans.factory.support

## 类 LookupOverride

- java.lang.Object
- - org.springframework.beans.factory.support.MethodOverride
  - - org.springframework.beans.factory.support.LookupOverride

- 所有已实现的接口:
    BeanMetadataElement

      public class LookupOverride
      extends 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.

  从以下版本开始:
    1.1
  作者:
    Rod Johnson, Juergen Hoeller

- - ### 构造器概要

    构造器
    构造器和说明
    `LookupOverride(Method method, String beanName)` Construct a new LookupOverride.
    `LookupOverride(String methodName, String beanName)` Construct a new LookupOverride.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `boolean` | `equals(Object other)`
    `String` | `getBeanName()` Return the name of the bean that should be returned by this method.
    `int` | `hashCode()`
    `boolean` | `matches(Method method)` Match the specified method by `Method` reference or method name.
    `String` | `toString()`

    - ### 从类继承的方法 org.springframework.beans.factory.support.MethodOverride

      `getMethodName, getSource, isOverloaded, setOverloaded, setSource`

    - ### 从类继承的方法 java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### 构造器详细资料

    - #### LookupOverride

          public LookupOverride(String methodName,
                                @Nullable
                                String beanName)

      Construct a new LookupOverride.
      参数:
        `methodName` - the name of the method to override
        `beanName` - the name of the bean in the current `BeanFactory` that the overridden method should return (may be `null`)

    - #### LookupOverride

          public LookupOverride(Method method,
                                @Nullable
                                String beanName)

      Construct a new LookupOverride.
      参数:
        `method` - the method to override
        `beanName` - the name of the bean in the current `BeanFactory` that the overridden method should return (may be `null`)

  - ### 方法详细资料

    - #### getBeanName

          @Nullable
          public String getBeanName()

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

    - #### matches

          public boolean matches(Method method)

      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.

      指定者:
        `matches` 在类中 `MethodOverride`
      参数:
        `method` - the method to check
      返回:
        whether this override matches the given method

    - #### equals

          public boolean equals(Object other)

      覆盖:
        `equals` 在类中 `MethodOverride`

    - #### hashCode

          public int hashCode()

      覆盖:
        `hashCode` 在类中 `MethodOverride`

    - #### toString

          public String toString()

      覆盖:
        `toString` 在类中 `Object`