this.aspects = aspects;
}
protected CodeBlock getAddAdvices() {
final Type beanFactory = this.getBeanFactory();
final AddAdviceTemplatedFile addAdvice = new AddAdviceTemplatedFile();
return new CollectionTemplatedCodeBlock<Aspect>() {
@Override
public InputStream getInputStream() {
return addAdvice.getInputStream();
}
@Override
protected Object getValue0(final String name) {
return addAdvice.getValue0(name);
}
@Override
protected Collection<Aspect> getCollection() {
return ProxyInterceptedMethodTemplatedFile.this.getAspects();
}
@Override
protected void prepareToWrite(Aspect aspect) {
addAdvice.setBeanId(aspect.getAdvisor());
addAdvice.setBeanFactory(beanFactory);
}
@Override
protected void writeBetweenElements(SourceWriter writer) {
writer.println();