com.vaadin.flow.server.webcomponent.
Class WebComponentModulesWriter.DirectoryWriter
- java.lang.Object
-
- com.vaadin.flow.server.webcomponent.WebComponentModulesWriter.DirectoryWriter
-
All Implemented Interfaces:
Enclosing class:
public static final class WebComponentModulesWriter.DirectoryWriter extends Object implements Serializable
Enables the usage of given
WebComponentModulesWriter
class via reflection. This is to simplify the usage of theWebComponentModulesWriter
when the writer and receivedWebComponentExporter
classes are loaded by a different class loader than the code using the writer.See Also:
-
-
Constructor Summary
Constructors Constructor Description DirectoryWriter()
-
Method Summary
All Methods Modifier and Type Method Description static Set<File>
generateWebComponentsToDirectory​(Class<?> writerClass, Set<Class<?>> exporterClasses, File outputDirectory, boolean compatibilityMode, String themeName)
Calls
WebComponentModulesWriter.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)
Calls
WebComponentModulesWriter.writeWebComponentsToDirectory(java.util.Set, java.io.File, boolean, java.lang.String)
via reflection on the suppliedwriter
. Thewriter
andexporterClasses
must be loaded with the same class loader.Parameters:
writerClass
-WebComponentModulesWriter
classexporterClasses
- set ofWebComponentExporter
/WebComponentExporterFactory
classes, loaded with the same class loader aswriter
outputDirectory
- target directory for the generated web component module filescompatibilityMode
-true
to generated html modules,false
to * generate JavaScript modulesthemeName
- the theme defined usingTheme
ornull
if not definedReturns:
generated files
Throws:
NullPointerException
- ifwriterClassSupplier
,exporterClassSupplier
, oroutputDirectory
isnull
IllegalArgumentException
- ifwriter
is notWebComponentModulesWriter
classIllegalArgumentException
- ifwriterClass
andexporterClasses
do not share a class loaderIllegalStateException
- if the receivedwriter
does not have methodWebComponentModulesWriter.writeWebComponentsToDirectory(java.util.Set, java.io.File, boolean, java.lang.String)
RuntimeException
- if reflective method invocation failsSee Also:
-
-