org.riotfamily.common.beans.config
Class HighestPrecedenceFactoryBean
java.lang.Object
org.riotfamily.common.beans.config.HighestPrecedenceFactoryBean
- All Implemented Interfaces:
- FactoryBean, ApplicationContextAware
public class HighestPrecedenceFactoryBean
- extends Object
- implements FactoryBean, ApplicationContextAware
FactoryBean that looks for all beans of a certain type and returns the one
with the highest precedence
.
- Author:
- Felix Gnass [fgnass at neteye dot de]
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HighestPrecedenceFactoryBean
public HighestPrecedenceFactoryBean()
setType
public void setType(Class<? extends Ordered> type)
setApplicationContext
public void setApplicationContext(ApplicationContext applicationContext)
- Specified by:
setApplicationContext
in interface ApplicationContextAware
getObject
public Object getObject()
throws Exception
- Specified by:
getObject
in interface FactoryBean
- Throws:
Exception
getObjectType
public Class<? extends Ordered> getObjectType()
- Specified by:
getObjectType
in interface FactoryBean
isSingleton
public boolean isSingleton()
- Specified by:
isSingleton
in interface FactoryBean