类 ReplaceOverride

  • 所有已实现的接口:
    BeanMetadataElement

    public class ReplaceOverride
    extends MethodOverride
    Extension of MethodOverride that represents an arbitrary override of a method by the IoC container.

    Any non-final method can be overridden, irrespective of its parameters and return types.

    从以下版本开始:
    1.1
    作者:
    Rod Johnson, Juergen Hoeller
    • 构造器详细资料

      • ReplaceOverride

        public ReplaceOverride​(String methodName,
                               String methodReplacerBeanName)
        Construct a new ReplaceOverride.
        参数:
        methodName - the name of the method to override
        methodReplacerBeanName - the bean name of the MethodReplacer
    • 方法详细资料

      • addTypeIdentifier

        public void addTypeIdentifier​(String identifier)
        Add a fragment of a class string, like "Exception" or "java.lang.Exc", to identify a parameter type.
        参数:
        identifier - a substring of the fully qualified class name
      • matches

        public boolean matches​(Method method)
        从类复制的说明: MethodOverride
        Subclasses must override this to indicate whether they match the given method. This allows for argument list checking as well as method name checking.
        指定者:
        matches 在类中 MethodOverride
        参数:
        method - the method to check
        返回:
        whether this override matches the given method