else
api = _configType.getType();
Class cl = factory.getDriverClassByScheme(api, localName);
return new CustomBeanConfig(qName, cl);
}
if (! uri.startsWith("urn:java:"))
throw new IllegalStateException(L.l("'{0}' is an unexpected namespace, expected 'urn:java:...'", uri));
String packageName = uri.substring("uri:java:".length());
Class cl = TypeFactory.loadClass(packageName, localName);
if (cl == null) {
ConfigType type = TypeFactory.getFactory().getEnvironmentType(qName);
if (type != null)
return type.create(parent, qName);
throw new ConfigException(L.l("'{0}.{1}' is an unknown class for element '{2}'",
packageName, localName, qName));
}
if (Annotation.class.isAssignableFrom(cl)) {
return new AnnotationConfig(cl);
}
else {
CustomBeanConfig config = new CustomBeanConfig(qName, cl);
// config.setScope("singleton");
return config;
}