Method method, ProxyFactory pf) {
int added = 0;
for (String adviceName : pointcuts.keySet()) {
Pointcut pc = pointcuts.get(adviceName);
if (AopUtils.canApply(pc, originallyCreatedBean.getClass())) {
Advice advice = (Advice) childBeanFactory.getBean(adviceName);
DefaultPointcutAdvisor a = new DefaultPointcutAdvisor(pc, advice);
// Order advisors if necessary
if (pc instanceof Ordered) {
a.setOrder(((Ordered) pc).getOrder());