public class ServletContextInitializerBeans extends 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(ListableBeanFactory beanFactory,
Class<? extends ServletContextInitializer>... initializerTypes) |
Modifier and Type | Method and Description |
---|---|
protected void |
addAdaptableBeans(ListableBeanFactory beanFactory) |
protected <T> void |
addAsRegistrationBean(ListableBeanFactory beanFactory,
Class<T> type,
ServletContextInitializerBeans.RegistrationBeanAdapter<T> adapter) |
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
equals, hashCode, parallelStream, removeIf, spliterator, stream
@SafeVarargs public ServletContextInitializerBeans(ListableBeanFactory beanFactory, Class<? extends ServletContextInitializer>... initializerTypes)
protected void addAdaptableBeans(ListableBeanFactory beanFactory)
protected <T> void addAsRegistrationBean(ListableBeanFactory beanFactory, Class<T> type, ServletContextInitializerBeans.RegistrationBeanAdapter<T> adapter)
public Iterator<ServletContextInitializer> iterator()
iterator
in interface Iterable<ServletContextInitializer>
iterator
in interface Collection<ServletContextInitializer>
iterator
in class AbstractCollection<ServletContextInitializer>
public int size()
size
in interface Collection<ServletContextInitializer>
size
in class AbstractCollection<ServletContextInitializer>
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.