org.springframework.beans.factory.support
Class ReplaceOverride

java.lang.Object
  extended by org.springframework.beans.factory.support.MethodOverride
      extended by org.springframework.beans.factory.support.ReplaceOverride

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.

Since:
1.1
Author:
Rod Johnson

Constructor Summary
ReplaceOverride(String methodName, String methodReplacerBeanName)
          Construct a new ReplaceOverride.
 
Method Summary
 void addTypeIdentifier(String s)
          Add a fragment of a class string, like "Exception" or "java.lang.Exc", to identify a parameter type
 String getMethodReplacerBeanName()
          Return the name of the bean implementing MethodReplacer.
 boolean matches(Method method)
          Subclasses must override this to indicate whether they match the given method.
 String toString()
           
 
Methods inherited from class org.springframework.beans.factory.support.MethodOverride
getMethodName, isOverloaded, setOverloaded
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReplaceOverride

public ReplaceOverride(String methodName,
                       String methodReplacerBeanName)
Construct a new ReplaceOverride.

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

getMethodReplacerBeanName

public String getMethodReplacerBeanName()
Return the name of the bean implementing MethodReplacer.


addTypeIdentifier

public void addTypeIdentifier(String s)
Add a fragment of a class string, like "Exception" or "java.lang.Exc", to identify a parameter type

Parameters:
s - substring of class FQN

matches

public boolean matches(Method method)
Description copied from class: 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.

Specified by:
matches in class MethodOverride
Parameters:
method - the method to check
Returns:
whether this override matches the given method

toString

public String toString()
Overrides:
toString in class Object


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