INT-1338, Added namespace support for 'event-types' attribute

This commit is contained in:
Oleg Zhurakousky
2010-08-23 17:09:32 +00:00
parent 7816d5f681
commit 78dbf2bef5
7 changed files with 99 additions and 15 deletions

View File

@@ -26,6 +26,7 @@ import org.springframework.beans.factory.xml.BeanDefinitionParserDelegate;
import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.core.Conventions;
import org.springframework.util.Assert;
import org.springframework.util.ClassUtils;
import org.springframework.util.StringUtils;
import org.springframework.util.xml.DomUtils;
@@ -262,4 +263,21 @@ public abstract class IntegrationNamespaceUtils {
return innerComponentDefinition;
}
public static Class<?> convertFqClassNameToClassObject(String fullyQualifiedClassname, ParserContext parserContext){
Assert.isTrue(StringUtils.hasText(fullyQualifiedClassname), "'fullyQualifiedClassname' must be provided");
Assert.notNull(parserContext, "'parserContext' must be provided");
ClassLoader classLoader = parserContext.getReaderContext().getBeanClassLoader();
if (classLoader == null) {
classLoader = ClassUtils.getDefaultClassLoader();
}
if (classLoader != null){
try {
return classLoader.loadClass(fullyQualifiedClassname);
} catch (Exception e) {
// no handling required, method may return null
}
}
return null;
}
}