com.vaadin.flow.server.startup.
Class RouteRegistryInitializer
All Implemented Interfaces:
ClassLoaderAwareServletContainerInitializer
, VaadinContextStartupInitializer
, VaadinServletContextStartupInitializer
, jakarta.servlet.ServletContainerInitializer
, Serializable
Servlet initializer for collecting all available Route
s on startup.
For internal use only. May be renamed or removed in a future release.
Since:
1.0
See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
initialize
(Set<Class<?>> classSet, VaadinContext context) Applies this initializer to the given context
static void
validateLayoutAnnotations
(Set<Class<?>> routesSet) Validate
Layout
annotations that they are not added on classes that do not extendRouterLayout
as they can not work without the implementation.Methods inherited from class com.vaadin.flow.server.startup.AbstractRouteRegistryInitializer
validatePwaClass, validateRouteClasses
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.vaadin.flow.server.startup.ClassLoaderAwareServletContainerInitializer
onStartup, requiresLookup
Methods inherited from interface com.vaadin.flow.server.startup.VaadinServletContextStartupInitializer
process
-
Constructor Details
-
RouteRegistryInitializer
public RouteRegistryInitializer()
-
-
Method Details
-
initialize
public void initialize(Set<Class<?>> classSet, VaadinContext context) throws VaadinInitializerException Description copied from interface:
VaadinContextStartupInitializer
Applies this initializer to the given context
Specified by:
initialize
in interfaceVaadinContextStartupInitializer
Parameters:
classSet
- the Set of application classes which this initializer needs to do its jobcontext
- theVaadinContext
to use with this initializerThrows:
VaadinInitializerException
- if an error has occurred -
validateLayoutAnnotations
public static void validateLayoutAnnotations(Set<Class<?>> routesSet) throws InvalidRouteLayoutConfigurationException Validate
Layout
annotations that they are not added on classes that do not extendRouterLayout
as they can not work without the implementation.Parameters:
routesSet
- Routes to checkThrows:
InvalidRouteLayoutConfigurationException
- Thrown if anyLayout
annotations are found on nonRouterLayout
classes
-