public class ServletContextInitializerBeans extends java.util.AbstractCollection<ServletContextInitializer>
ServletContextInitializer
s obtained from a
ListableBeanFactory
. Includes all ServletContextInitializer
beans and
also adapts Servlet
, Filter
and certain EventListener
beans.
Items are sorted so that adapted beans are top (Servlet
, Filter
then
EventListener
) and direct ServletContextInitializer
beans are at the
end. Further sorting is applied within these groups using the
AnnotationAwareOrderComparator
.
Modifier and Type | Class and Description |
---|---|
protected static interface |
ServletContextInitializerBeans.RegistrationBeanAdapter<T>
Adapter to convert a given Bean type into a
RegistrationBean (and hence a
ServletContextInitializer ). |
Constructor and Description |
---|
ServletContextInitializerBeans(org.springframework.beans.factory.ListableBeanFactory beanFactory,
java.lang.Class<? extends ServletContextInitializer>... initializerTypes) |
Modifier and Type | Method and Description |
---|---|
protected void |
addAdaptableBeans(org.springframework.beans.factory.ListableBeanFactory beanFactory) |
protected <T> void |
addAsRegistrationBean(org.springframework.beans.factory.ListableBeanFactory beanFactory,
java.lang.Class<T> type,
ServletContextInitializerBeans.RegistrationBeanAdapter<T> adapter) |
java.util.Iterator<ServletContextInitializer> |
iterator() |
int |
size() |
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
@SafeVarargs public ServletContextInitializerBeans(org.springframework.beans.factory.ListableBeanFactory beanFactory, java.lang.Class<? extends ServletContextInitializer>... initializerTypes)
protected void addAdaptableBeans(org.springframework.beans.factory.ListableBeanFactory beanFactory)
protected <T> void addAsRegistrationBean(org.springframework.beans.factory.ListableBeanFactory beanFactory, java.lang.Class<T> type, ServletContextInitializerBeans.RegistrationBeanAdapter<T> adapter)
public java.util.Iterator<ServletContextInitializer> iterator()
iterator
in interface java.lang.Iterable<ServletContextInitializer>
iterator
in interface java.util.Collection<ServletContextInitializer>
iterator
in class java.util.AbstractCollection<ServletContextInitializer>
public int size()
size
in interface java.util.Collection<ServletContextInitializer>
size
in class java.util.AbstractCollection<ServletContextInitializer>