Spring Framework MethodInvokingFactoryBean - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework MethodInvokingFactoryBean class.

This code example shows how to use the following methods:afterPropertiesSet, getTargetObject, setTargetObject
 * 
 * @author Rob Winch 
 */ 
final class ClearCredentialsMethodInvokingFactoryBean extends MethodInvokingFactoryBean {
    public void afterPropertiesSet() throws Exception {
        boolean isTargetProviderManager = getTargetObject() instanceof ProviderManager;
        if(!isTargetProviderManager) {
            setTargetObject(this);
        } 
        super.afterPropertiesSet(); 
    } 
 
    /** 
     * The default value if the target object is not a ProviderManager is false. We use false because this feature is 
     * associated with {@link ProviderManager} not {@link AuthenticationManager}. If the user wants to leverage 
     * {@link ProviderManager#setEraseCredentialsAfterAuthentication(boolean)} their original 
     * {@link AuthenticationManager} must be a {@link ProviderManager} (we should not magically add this functionality 
     * to their implementation since we cannot determine if it should be on or off). 
     * 
     * @return 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
See Code Examples for Spring Framework MethodInvokingFactoryBean Methods: