Class NpmTemplateParser
- java.lang.Object
-
- com.vaadin.flow.component.polymertemplate.NpmTemplateParser
-
- All Implemented Interfaces:
TemplateParser
@Deprecated public class NpmTemplateParser extends Object implements TemplateParser
Deprecated.UseLitTemplateParserImplclass forLitTemplatecomponents. Polymer template support is deprecated - we recommend you to useLitTemplateinstead. Read more details from the Vaadin blog.Npm template parser implementation.The implementation scans all JsModule annotations for the given template class and tries to find the one that contains template definition using the tag name.
The class is Singleton. Use
getInstance()to get its instance.For internal use only. May be renamed or removed in a future release.
- Since:
- 2.0
- Author:
- Vaadin Ltd
- See Also:
BundleParser
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.vaadin.flow.component.polymertemplate.TemplateParser
TemplateParser.TemplateData, TemplateParser.TemplateParserFactory
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNpmTemplateParser()Deprecated.The default constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static TemplateParsergetInstance()Deprecated.protected StringgetSourcesFromTemplate(VaadinService service, String tag, String url)Deprecated.Finds the JavaScript sources for given tag.TemplateParser.TemplateDatagetTemplateContent(Class<? extends PolymerTemplate<?>> clazz, String tag, VaadinService service)Deprecated.Gets the template data which contains a JSOUPElementrepresenting the template content and the template uri.
-
-
-
Method Detail
-
getInstance
public static TemplateParser getInstance()
Deprecated.
-
getTemplateContent
public TemplateParser.TemplateData getTemplateContent(Class<? extends PolymerTemplate<?>> clazz, String tag, VaadinService service)
Deprecated.Description copied from interface:TemplateParserGets the template data which contains a JSOUPElementrepresenting the template content and the template uri.- Specified by:
getTemplateContentin interfaceTemplateParser- Parameters:
clazz- the template classtag- the template tag nameservice- the related Vaadin service- Returns:
- the template data
-
getSourcesFromTemplate
protected String getSourcesFromTemplate(VaadinService service, String tag, String url)
Deprecated.Finds the JavaScript sources for given tag.- Parameters:
service- the related Vaadin servicetag- the value of theTagannotation, e.g. `my-component`url- the URL resolved according to theJsModulespec, for example./view/my-view.jsor@vaadin/vaadin-button.js.- Returns:
- the .js source which declares given custom element, or null if no such source can be found.
-
-