com.vaadin.flow.server.webcomponent.
Class WebComponentGenerator
- java.lang.Object
-
- com.vaadin.flow.server.webcomponent.WebComponentGenerator
-
public class WebComponentGenerator extends Object
Generates a client-side web component from a Java class.
Since:
2.0
Author:
Vaadin Ltd.
-
-
Method Summary
All Methods Modifier and Type Method and Description static String
generateModule(WebComponentConfiguration<? extends Component> webComponentConfiguration, String frontendURI, boolean compatibilityMode)
Generate web component html/JS for given tag and class.
static String
generateModule(WebComponentExporterFactory<? extends Component> factory, String frontendURI, boolean compatibilityMode)
Generate web component html/JS for given exporter factory.
-
-
-
Method Detail
-
generateModule
public static String generateModule(WebComponentExporterFactory<? extends Component> factory, String frontendURI, boolean compatibilityMode)
Generate web component html/JS for given exporter factory.
Parameters:
factory
- web component exporter factory, notnull
frontendURI
- the frontend resources URI, notnull
compatibilityMode
-true
to generate Polymer2 template,false
to generate Polymer3 templateReturns:
generated web component html/JS to be served to the client
-
generateModule
public static String generateModule(WebComponentConfiguration<? extends Component> webComponentConfiguration, String frontendURI, boolean compatibilityMode)
Generate web component html/JS for given tag and class.
Parameters:
webComponentConfiguration
- web component class implementation, notnull
frontendURI
- the frontend resources URI, notnull
compatibilityMode
-true
to generate Polymer2 template,false
to generate Polymer3 templateReturns:
generated web component html/JS to be served to the client
-
-