protected AliasDefinition readAlias(BeanContainer container, XmlReader reader, LoaderContext context) { String alias = reader.getRequiredAttribute(ALIAS_ATTRIBUTE); String id = reader.getAttribute(ID_ATTRIBUTE); if (!Strings.isEmpty(id)) { return new AliasDefinition(reader.getSource(), alias, id); } return new AliasDefinition(reader.getSource(), alias, forName(reader.getRequiredAttribute(TYPE_ATTRIBUTE)), reader.getRequiredAttribute(NAME_ATTRIBUTE) ); }
protected ValueDefinition tryCreateBeanReference(LoaderContext context, XmlReader reader, String refId, String refType, String refName) { if (!Strings.isEmpty(refId)) { return beanReference(context, refId); } if (!Strings.isAllEmpty(refType, refName)) { if (Strings.isEmpty(refType)) { throw new BeanDefinitionException("'The referenced bean type must not be empty, check :" + reader.getCurrentLocation()); } try { Class<?> c = forName(refType); return beanReference(context, c, refName); } catch (NestedClassNotFoundException e) { throw new BeanDefinitionException("Invalid class name '" + refType + "', source : " + reader.getSource(), e); } } return null; }
Class<?> c = forName(className); return resolvedValue(c); } catch (ObjectNotFoundException e) {
AppClassLoader.addInstrumentClass(beanClassName); log.trace("Resolving bean class '{}'...", beanClassName); bean.setBeanClass(forName(beanClassName)); } catch (NestedClassNotFoundException e) { throw new BeanDefinitionException("Error resolving bean class '" + beanClassName + "' , source : " + reader.getSource(), e);