com.vaadin.flow.component.littemplate.internal.
Class LitTemplateParserImpl
- java.lang.Object
-
- com.vaadin.flow.component.littemplate.internal.LitTemplateParserImpl
-
All Implemented Interfaces:
public class LitTemplateParserImpl extends Object implements LitTemplateParser
Lit 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:
Author:
Vaadin Ltd
See Also:
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.vaadin.flow.component.littemplate.LitTemplateParser
LitTemplateParser.LitTemplateParserFactory, LitTemplateParser.TemplateData
-
-
Constructor Summary
Constructors Modifier Constructor and Description protected
LitTemplateParserImpl()
The default constructor.
-
Method Summary
All Methods Modifier and Type Method and Description static LitTemplateParser
getInstance()
protected String
getSourcesFromTemplate(String tag, String url)
Finds the JavaScript sources for given tag.
LitTemplateParser.TemplateData
getTemplateContent(Class<? extends LitTemplate> clazz, String tag, VaadinService service)
Gets the template data which contains a JSOUP
Element
representing the template content and the template uri.
-
-
-
Constructor Detail
-
LitTemplateParserImpl
protected LitTemplateParserImpl()
The default constructor. Protected in order to prevent direct instantiation, but not private in order to allow mocking/overrides for testing purposes.
-
-
Method Detail
-
getInstance
public static LitTemplateParser getInstance()
-
getTemplateContent
public LitTemplateParser.TemplateData getTemplateContent(Class<? extends LitTemplate> clazz, String tag, VaadinService service)
Description copied from interface:
LitTemplateParser
Gets the template data which contains a JSOUP
Element
representing the template content and the template uri.Specified by:
getTemplateContent
in interfaceLitTemplateParser
Parameters:
clazz
- the template classtag
- the template tag nameservice
- the related Vaadin serviceReturns:
the template data, may be
null
-
-