public class WebComponentGenerator extends Object
Current implementation will create a Polymer 2 component that can be served to the client.
Modifier and Type | Method and Description |
---|---|
static String |
generateModule(Class<? extends WebComponentExporter<? extends Component>> exporterClass,
String frontendURI,
boolean compatibilityMode)
Generate web component html/JS for given exporter class.
|
static String |
generateModule(WebComponentConfiguration<? extends Component> webComponentConfiguration,
String frontendURI,
boolean compatibilityMode)
Generate web component html/JS for given tag and class.
|
public static String generateModule(Class<? extends WebComponentExporter<? extends Component>> exporterClass, String frontendURI, boolean compatibilityMode)
exporterClass
- web component exporter class, not null
frontendURI
- the frontend resources URI, not null
compatibilityMode
- true
to generate Polymer2 template, false
to
generate Polymer3 templatepublic static String generateModule(WebComponentConfiguration<? extends Component> webComponentConfiguration, String frontendURI, boolean compatibilityMode)
webComponentConfiguration
- web component class implementation, not null
frontendURI
- the frontend resources URI, not null
compatibilityMode
- true
to generate Polymer2 template, false
to
generate Polymer3 templateCopyright © 2019. All rights reserved.