Class ServletContextInitializerBeans
java.lang.Object
java.util.AbstractCollection<ServletContextInitializer>
org.springframework.boot.web.servlet.ServletContextInitializerBeans
- All Implemented Interfaces:
Iterable<ServletContextInitializer>
,Collection<ServletContextInitializer>
A collection
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
.
- Since:
- 1.4.0
- Author:
- Dave Syer, Phillip Webb, Brian Clozel
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static interface
Adapter to convert a given Bean type into aRegistrationBean
(and hence aServletContextInitializer
). -
Constructor Summary
ConstructorDescriptionServletContextInitializerBeans
(ListableBeanFactory beanFactory, Class<? extends ServletContextInitializer>... initializerTypes) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addAdaptableBeans
(ListableBeanFactory beanFactory) protected <T> void
addAsRegistrationBean
(ListableBeanFactory beanFactory, Class<T> type, ServletContextInitializerBeans.RegistrationBeanAdapter<T> adapter) iterator()
int
size()
Methods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
Constructor Details
-
ServletContextInitializerBeans
@SafeVarargs public ServletContextInitializerBeans(ListableBeanFactory beanFactory, Class<? extends ServletContextInitializer>... initializerTypes)
-
-
Method Details
-
addAdaptableBeans
-
addAsRegistrationBean
protected <T> void addAsRegistrationBean(ListableBeanFactory beanFactory, Class<T> type, ServletContextInitializerBeans.RegistrationBeanAdapter<T> adapter) -
iterator
- Specified by:
iterator
in interfaceCollection<ServletContextInitializer>
- Specified by:
iterator
in interfaceIterable<ServletContextInitializer>
- Specified by:
iterator
in classAbstractCollection<ServletContextInitializer>
-
size
public int size()- Specified by:
size
in interfaceCollection<ServletContextInitializer>
- Specified by:
size
in classAbstractCollection<ServletContextInitializer>
-