org.springframework.beans.factory.support

## 类 MethodOverride

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

- 所有已实现的接口:
    BeanMetadataElement
  直接已知子类:
    LookupOverride, ReplaceOverride

      public abstract class MethodOverride
      extends Object
      implements BeanMetadataElement

  Object representing the override of a method on a managed object by the IoC container.

  Note that the override mechanism is not intended as a generic means of inserting crosscutting code: use AOP for that.

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

- - ### 构造器概要

    构造器
    限定符 | 构造器和说明
    --- | ---
    `protected` | `MethodOverride(String methodName)` Construct a new override for the given method.

  - ### 方法概要

    所有方法 实例方法 抽象方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `boolean` | `equals(Object other)`
    `String` | `getMethodName()` Return the name of the method to be overridden.
    `Object` | `getSource()` 获取源对象,可能返回null Return the configuration source `Object` for this metadata element (may be `null`).
    `int` | `hashCode()`
    `protected boolean` | `isOverloaded()` Return whether the overridden method is overloaded (i.e., whether argument type matching needs to occur to disambiguate methods of the same name).
    `abstract boolean` | `matches(Method method)` Subclasses must override this to indicate whether they match the given method.
    `protected void` | `setOverloaded(boolean overloaded)` Set whether the overridden method is overloaded (i.e., whether argument type matching needs to occur to disambiguate methods of the same name).
    `void` | `setSource(Object source)` Set the configuration source `Object` for this metadata element.

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

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

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

    - #### MethodOverride

          protected MethodOverride(String methodName)

      Construct a new override for the given method.
      参数:
        `methodName` - the name of the method to override

  - ### 方法详细资料

    - #### getMethodName

          public String getMethodName()

      Return the name of the method to be overridden.

    - #### setOverloaded

          protected void setOverloaded(boolean overloaded)

      Set whether the overridden method is overloaded (i.e., whether argument type matching needs to occur to disambiguate methods of the same name).

      Default is `true`; can be switched to `false` to optimize runtime performance.

    - #### isOverloaded

          protected boolean isOverloaded()

      Return whether the overridden method is overloaded (i.e., whether argument type matching needs to occur to disambiguate methods of the same name).

    - #### setSource

          public void setSource(@Nullable
                                Object source)

      Set the configuration source `Object` for this metadata element.

      The exact type of the object will depend on the configuration mechanism used.

    - #### getSource

          @Nullable
          public Object getSource()

      从接口复制的说明: `BeanMetadataElement`
      获取源对象,可能返回null Return the configuration source `Object` for this metadata element (may be `null`).
      指定者:
        `getSource` 在接口中 `BeanMetadataElement`

    - #### matches

          public abstract boolean matches(Method method)

      Subclasses must override this to indicate whether they match the given method. This allows for argument list checking as well as method name checking.
      参数:
        `method` - the method to check
      返回:
        whether this override matches the given method

    - #### equals

          public boolean equals(Object other)

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

    - #### hashCode

          public int hashCode()

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