org.zeroexchange.common
Class AbstractBeansRegistry<T>

java.lang.Object
  extended by org.zeroexchange.common.AbstractBeansRegistry<T>
All Implemented Interfaces:
org.springframework.beans.factory.config.BeanPostProcessor, BeansRegistry<T>
Direct Known Subclasses:
TypedBeansRegistry

public abstract class AbstractBeansRegistry<T>
extends Object
implements org.springframework.beans.factory.config.BeanPostProcessor, BeansRegistry<T>

Author:
black

Constructor Summary
AbstractBeansRegistry()
           
 
Method Summary
protected  Collection<T> createBeansCollection()
          Creates collection to hold elected layout beans.
 Collection<T> getBeans()
          Returns beans collected by the current registry.
protected abstract  boolean isElected(Object bean, String beanName)
          Override this method to determine which bean should be included to the current registry.
 Object postProcessAfterInitialization(Object bean, String beanName)
          
 Object postProcessBeforeInitialization(Object bean, String beanName)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractBeansRegistry

public AbstractBeansRegistry()
Method Detail

isElected

protected abstract boolean isElected(Object bean,
                                     String beanName)
Override this method to determine which bean should be included to the current registry.


postProcessBeforeInitialization

public Object postProcessBeforeInitialization(Object bean,
                                              String beanName)
                                       throws org.springframework.beans.BeansException

Specified by:
postProcessBeforeInitialization in interface org.springframework.beans.factory.config.BeanPostProcessor
Throws:
org.springframework.beans.BeansException

postProcessAfterInitialization

public Object postProcessAfterInitialization(Object bean,
                                             String beanName)
                                      throws org.springframework.beans.BeansException

Specified by:
postProcessAfterInitialization in interface org.springframework.beans.factory.config.BeanPostProcessor
Throws:
org.springframework.beans.BeansException

getBeans

public Collection<T> getBeans()
Returns beans collected by the current registry.

Specified by:
getBeans in interface BeansRegistry<T>

createBeansCollection

protected Collection<T> createBeansCollection()
Creates collection to hold elected layout beans.



Copyright © 2013. All Rights Reserved.