Source:
<code>public void afterPropertiesSet() throws Exception { ReflectionUtils.doWithMethods(this.type, new ReflectionUtils.MethodCallback() { @Override public void doWith(Method method) throws IllegalArgumentException { <START> Assert.notNull(BindableProxyFactory.this.channelFactory, "Channel Factory cannot be null"); <END> Input input = AnnotationUtils.findAnnotation(method, Input.class); if (input != null) { String name = BindingBeanDefinitionRegistryUtils.getChannelName(input, method); validateChannelType(method.getReturnType()); MessageChannel sharedChannel = locateSharedChannel(name); if (sharedChannel == null) { BindableProxyFactory.this.inputHolders.put(name, new ChannelHolder( BindableProxyFactory.this.channelFactory.createInputChannel(name), true)); } else { BindableProxyFactory.this.inputHolders.put(name, new ChannelHolder(sharedChannel, false)); } } } }); ReflectionUtils.doWithMethods(this.type, new ReflectionUtils.MethodCallback() { @Override public void doWith(Method method) throws IllegalArgumentException { Output output = AnnotationUtils.findAnnotation(method, Output.class); if (output != null) { String name = BindingBeanDefinitionRegistryUtils.getChannelName(output, method); validateChannelType(method.getReturnType()); MessageChannel sharedChannel = locateSharedChannel(name); if (sharedChannel == null) { BindableProxyFactory.this.outputHolders.put(name, new ChannelHolder( BindableProxyFactory.this.channelFactory.createOutputChannel(name), true)); } else { BindableProxyFactory.this.outputHolders.put(name, new ChannelHolder(sharedChannel, false)); } } } }); }</code><technical_language>This done once, calling doWith() for method</technical_language>

Target:
public void afterPropertiesSet() throws Exception { Assert.notNull(BindableProxyFactory.this.channelFactory, "Channel Factory cannot be null"); ReflectionUtils.doWithMethods(this.type, new ReflectionUtils.MethodCallback() { @Override public void doWith(Method method) throws IllegalArgumentException { Input input = AnnotationUtils.findAnnotation(method, Input.class); if (input != null) { String name = BindingBeanDefinitionRegistryUtils.getChannelName(input, method); validateChannelType(method.getReturnType()); MessageChannel sharedChannel = locateSharedChannel(name); if (sharedChannel == null) { BindableProxyFactory.this.inputHolders.put(name, new ChannelHolder( BindableProxyFactory.this.channelFactory.createInputChannel(name), true)); } else { BindableProxyFactory.this.inputHolders.put(name, new ChannelHolder(sharedChannel, false)); } } } }); ReflectionUtils.doWithMethods(this.type, new ReflectionUtils.MethodCallback() { @Override public void doWith(Method method) throws IllegalArgumentException { Output output = AnnotationUtils.findAnnotation(method, Output.class); if (output != null) { String name = BindingBeanDefinitionRegistryUtils.getChannelName(output, method); validateChannelType(method.getReturnType()); MessageChannel sharedChannel = locateSharedChannel(name); if (sharedChannel == null) { BindableProxyFactory.this.outputHolders.put(name, new ChannelHolder( BindableProxyFactory.this.channelFactory.createOutputChannel(name), true)); } else { BindableProxyFactory.this.outputHolders.put(name, new ChannelHolder(sharedChannel, false)); } } } }); }