- All Known Subinterfaces:
TemplateProvider.GeneratedTemplateProvider
- All Known Implementing Classes:
ExampleModelRenderer
,HelloModelAndViewView
,HelloModelView
,HelloModelView
,MessagePageRenderer
,MessagePageRenderer
,TemplateCatalog
public interface TemplateProvider
A
ServiceLoader
interface for finding Template
s.
In non modular applications the Templates can be found using this interface and the
ServiceLoader
mechanism through the META-INF/services
file as the code generator generates the services file. However in modular applications
this is not possible as the implementations are described in the module-info.java and
the code generator does not touch that.
Regardless of modular or not the generated META-INF/services also might give hints to Graal native compilation for reflective access to the templates.
- Author:
- agentgt
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Generated template providers implement this interface to support easier ServiceLoader registration for modular libraries/applications. -
Method Summary
Modifier and TypeMethodDescriptionProvides templates with empty config.provideTemplates
(TemplateConfig templateConfig) Provides a list of instantiated renderers.
-
Method Details
-
provideTemplates
Provides a list of instantiated renderers.- Parameters:
templateConfig
- template collaborators.- Returns:
- a list of renderers. An empty list would mean none were found.
-
provideTemplates
Provides templates with empty config.- Returns:
- a list of templates. An empty list would mean none were fond.
-