Class WebComponentModulesWriter.DirectoryWriter
- java.lang.Object
-
- com.vaadin.flow.server.webcomponent.WebComponentModulesWriter.DirectoryWriter
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- WebComponentModulesWriter
public static final class WebComponentModulesWriter.DirectoryWriter extends Object implements Serializable
Enables the usage of givenWebComponentModulesWriterclass via reflection. This is to simplify the usage of theWebComponentModulesWriterwhen the writer and receivedWebComponentExporterclasses are loaded by a different class loader than the code using the writer.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DirectoryWriter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Set<File>generateWebComponentsToDirectory(Class<?> writerClass, Set<Class<?>> exporterClasses, File outputDirectory, boolean compatibilityMode, String themeName)CallsWebComponentModulesWriter.writeWebComponentsToDirectory(java.util.Set, java.io.File, boolean, java.lang.String)via reflection on the suppliedwriter.
-
-
-
Method Detail
-
generateWebComponentsToDirectory
public static Set<File> generateWebComponentsToDirectory(Class<?> writerClass, Set<Class<?>> exporterClasses, File outputDirectory, boolean compatibilityMode, String themeName)
CallsWebComponentModulesWriter.writeWebComponentsToDirectory(java.util.Set, java.io.File, boolean, java.lang.String)via reflection on the suppliedwriter. ThewriterandexporterClassesmust be loaded with the same class loader.- Parameters:
writerClass-WebComponentModulesWriterclassexporterClasses- set ofWebComponentExporter/WebComponentExporterFactoryclasses, loaded with the same class loader aswriteroutputDirectory- target directory for the generated web component module filescompatibilityMode-trueto generated html modules,falseto * generate JavaScript modulesthemeName- the theme defined usingThemeornullif not defined- Returns:
- generated files
- Throws:
NullPointerException- ifwriterClassSupplier,exporterClassSupplier, oroutputDirectoryisnullIllegalArgumentException- ifwriteris notWebComponentModulesWriterclassIllegalArgumentException- ifwriterClassandexporterClassesdo not share a class loaderIllegalStateException- if the receivedwriterdoes not have methodWebComponentModulesWriter.writeWebComponentsToDirectory(java.util.Set, java.io.File, boolean, java.lang.String)RuntimeException- if reflective method invocation fails- See Also:
WebComponentModulesWriter.writeWebComponentsToDirectory(java.util.Set, java.io.File, boolean, java.lang.String)
-
-