Interface TemplateProvider

All Known Implementing Classes:
HelloModelView, HelloModelView, MessagePageRenderer, MessagePageRenderer

public interface TemplateProvider
A ServiceLoader interface for finding Templates.

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
  • 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.