}
return registry;
}
public <T> T getRegistry(Class<T> type) {
Registry reg = getRegistry();
// unwrap the property placeholder delegate
if (reg instanceof PropertyPlaceholderDelegateRegistry) {
reg = ((PropertyPlaceholderDelegateRegistry) reg).getRegistry();
}
if (type.isAssignableFrom(reg.getClass())) {
return type.cast(reg);
} else if (reg instanceof CompositeRegistry) {
List<Registry> list = ((CompositeRegistry) reg).getRegistryList();
for (Registry r : list) {
if (type.isAssignableFrom(r.getClass())) {