//We loop through twice, as the more more general form with no parameters is applied to all methods with that name
//while the method that specifies the actual parameters override this
for (final RemoveMethodMetaData removeMethod : beanMetaData.getRemoveMethods()) {
if(removeMethod.getBeanMethod().getMethodParams() == null) {
final NamedMethodMetaData methodData = removeMethod.getBeanMethod();
final Collection<Method> methods = MethodResolutionUtils.resolveMethods(methodData, componentClass, reflectionIndex);
for(final Method method : methods) {
final Boolean retainIfException = removeMethod.getRetainIfException();
final MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifierForMethod(method);
if(retainIfException == null) {
//if this is null we have to allow annotation values of retainIfException to take precidence
if(!annotationRemoveMethods.contains(methodIdentifier)) {
componentConfiguration.addRemoveMethod(methodIdentifier, false);
}
} else {
componentConfiguration.addRemoveMethod(methodIdentifier, retainIfException);
}
}
}
}
for (final RemoveMethodMetaData removeMethod : beanMetaData.getRemoveMethods()) {
if(removeMethod.getBeanMethod().getMethodParams() != null) {
final NamedMethodMetaData methodData = removeMethod.getBeanMethod();
final Collection<Method> methods = MethodResolutionUtils.resolveMethods(methodData, componentClass, reflectionIndex);
for(final Method method : methods) {
final Boolean retainIfException = removeMethod.getRetainIfException();
final MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifierForMethod(method);
if(retainIfException == null) {