Package com.vaadin.flow.server.startup
Class WebComponentExporterAwareValidator
- java.lang.Object
-
- com.vaadin.flow.server.startup.AbstractAnnotationValidator
-
- com.vaadin.flow.server.startup.WebComponentExporterAwareValidator
-
- All Implemented Interfaces:
ClassLoaderAwareServletContainerInitializer,VaadinContextStartupInitializer,VaadinServletContextStartupInitializer,Serializable,javax.servlet.ServletContainerInitializer
public class WebComponentExporterAwareValidator extends AbstractAnnotationValidator implements VaadinServletContextStartupInitializer
Checks that specific annotations are not configured wrong.The validation is run during servlet container initialization.
For internal use only. May be renamed or removed in a future release.
- Since:
- 2.0
- Author:
- Vaadin Ltd.
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.vaadin.flow.server.startup.AbstractAnnotationValidator
ERROR_MESSAGE_BEGINNING, MIDDLE_ROUTER_LAYOUT, NON_PARENT, NON_PARENT_ALIAS, NON_ROUTER_LAYOUT
-
-
Constructor Summary
Constructors Constructor Description WebComponentExporterAwareValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Class<?>>getAnnotations()Gets the annotations that are subject to validate.protected StringgetErrorHint()Returns a hint for the discovered validation errors.protected Optional<String>handleNonRouterLayout(Class<?> clazz)Handles theclazzwhich is not a top level route and not a router layout.voidinitialize(Set<Class<?>> classSet, VaadinContext context)Applies this initializer to the given context-
Methods inherited from class com.vaadin.flow.server.startup.AbstractAnnotationValidator
getClassAnnotations, getClassAnnotations, removeHandleTypesSelfReferences, validateClasses
-
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
-
-
-
-
Method Detail
-
initialize
public void initialize(Set<Class<?>> classSet, VaadinContext context)
Description copied from interface:VaadinContextStartupInitializerApplies this initializer to the given context- Specified by:
initializein interfaceVaadinContextStartupInitializer- Parameters:
classSet- the Set of application classes which this initializer needs to do its jobcontext- theVaadinContextto use with this initializer
-
handleNonRouterLayout
protected Optional<String> handleNonRouterLayout(Class<?> clazz)
Description copied from class:AbstractAnnotationValidatorHandles theclazzwhich is not a top level route and not a router layout. Returns an optional message which describes the error having an annotation for the class.- Overrides:
handleNonRouterLayoutin classAbstractAnnotationValidator- Parameters:
clazz- class to validate annotations- Returns:
- an optional error message or empty if there is no error
-
getErrorHint
protected String getErrorHint()
Description copied from class:AbstractAnnotationValidatorReturns a hint for the discovered validation errors.- Overrides:
getErrorHintin classAbstractAnnotationValidator- Returns:
- the error hint
-
getAnnotations
public List<Class<?>> getAnnotations()
Description copied from class:AbstractAnnotationValidatorGets the annotations that are subject to validate.- Specified by:
getAnnotationsin classAbstractAnnotationValidator- Returns:
- a list of target annotations
-
-