站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 1.2.9 API 文档英文版

MethodOverride (Spring Framework) - Spring Framework 1.2.9 API 文档英文版


org.springframework.beans.factory.support
Class MethodOverride

java.lang.Object
  extended by org.springframework.beans.factory.support.MethodOverride
Direct Known Subclasses:
LookupOverride, ReplaceOverride

public abstract class MethodOverride
extends Object

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.

Since:
1.1
Author:
Rod Johnson

Constructor Summary
protected MethodOverride(String methodName)
          Construct a new override for the given method.
 
Method Summary
 String getMethodName()
          Return the name of the method to be overridden.
protected  boolean isOverloaded()
          Return whether the overridden method has to be considered as overloaded (that is, whether arg type matching has to happen).
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 has to be considered as overloaded (that is, whether arg type matching has to happen).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodOverride

protected MethodOverride(String methodName)
Construct a new override for the given method.

Parameters:
methodName - the name of the method to override
Method Detail

getMethodName

public String getMethodName()
Return the name of the method to be overridden.


setOverloaded

protected void setOverloaded(boolean overloaded)
Set whether the overridden method has to be considered as overloaded (that is, whether arg type matching has to happen). Default is "true"; can be switched to false to optimize runtime performance.


isOverloaded

protected boolean isOverloaded()
Return whether the overridden method has to be considered as overloaded (that is, whether arg type matching has to happen).


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.

Parameters:
method - the method to check
Returns:
whether this override matches the given method


Copyright (c) 2002-2007 The Spring Framework Project.