org.springframework.beans.factory.support
Class ReplaceOverride

java.lang.Object
  extended byorg.springframework.beans.factory.support.MethodOverride
      extended byorg.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.

Author:
Rod Johnson

Constructor Summary
ReplaceOverride(String methodName, String methodReplacerBeanName)
           
 
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, MethodOverrides overrides)
          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
 
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)
Method Detail

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,
                       MethodOverrides overrides)
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
overrides - owning MethodOverrides object. This allows us to check whether the method is overloaded.
Returns:
whether this override matches the given method

getMethodReplacerBeanName

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


toString

public String toString()


Copyright (C) 2003-2004 The Spring Framework Project.