类 ReplaceOverride
- java.lang.Object
- org.springframework.beans.factory.support.MethodOverride
- org.springframework.beans.factory.support.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(String methodName, String methodReplacerBeanName)Construct a new ReplaceOverride.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaddTypeIdentifier(String identifier)Add a fragment of a class string, like "Exception" or "java.lang.Exc", to identify a parameter type.booleanequals(Object other)StringgetMethodReplacerBeanName()Return the name of the bean implementing MethodReplacer.inthashCode()booleanmatches(Method method)Subclasses must override this to indicate whether they match the given method.StringtoString()从类继承的方法 org.springframework.beans.factory.support.MethodOverride
getMethodName, getSource, isOverloaded, setOverloaded, setSource
构造器详细资料
ReplaceOverride
public ReplaceOverride(String methodName, String methodReplacerBeanName)
Construct a new ReplaceOverride.- 参数:
methodName- the name of the method to overridemethodReplacerBeanName- the bean name of the MethodReplacer
方法详细资料
getMethodReplacerBeanName
public String getMethodReplacerBeanName()
Return the name of the bean implementing 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)
从类复制的说明:MethodOverrideSubclasses 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
equals
public boolean equals(@Nullable Object other)
- 覆盖:
equals在类中MethodOverride
hashCode
public int hashCode()
- 覆盖:
hashCode在类中MethodOverride