for (BaseInterceptorData interceptor : interceptors)
{
String intName = name + "$" + i++;
BeanMetaDataBuilder interceptorBuilder = AOPBeanMetaDataBuilder.createBuilder(intName, interceptor.getBeanClassName());
setAspectManagerProperty(interceptorBuilder);
ValueMetaData injectBinding = interceptorBuilder.createInject(name, null, null, ControllerState.INSTANTIATED);
interceptorBuilder.addPropertyMetaData("binding", injectBinding);
if (interceptor instanceof AdviceOrInterceptorData)
{
ValueMetaData injectAspect = interceptorBuilder.createInject(interceptor.getRefName());
interceptorBuilder.addPropertyMetaData("aspect", injectAspect);
if (((AdviceOrInterceptorData)interceptor).getAdviceMethod() != null)
{
interceptorBuilder.addPropertyMetaData("aspectMethod", ((AdviceOrInterceptorData)interceptor).getAdviceMethod());
}
interceptorBuilder.addPropertyMetaData("type", ((AdviceOrInterceptorData)interceptor).getType());
}
else
{
ValueMetaData injectStack = interceptorBuilder.createInject(interceptor.getRefName());
interceptorBuilder.addPropertyMetaData("stack", injectStack);
}
result.add(interceptorBuilder.getBeanMetaData());
ValueMetaData injectInterceptor = bindingBuilder.createInject(intName);
bindingInterceptors.add(injectInterceptor);
}
bindingBuilder.addPropertyMetaData("advices", bindingInterceptors);
}