com.vaadin.hilla.

Class EndpointCodeGenerator

java.lang.Object
com.vaadin.hilla.EndpointCodeGenerator
@Component public class EndpointCodeGenerator extends Object

Handles (re)generation of the TypeScript code.

  • Constructor Details

    • EndpointCodeGenerator

      public EndpointCodeGenerator(VaadinContext context, EndpointController endpointController)

      Creates the singleton.

      Parameters:

      context - the context the application is running in

      endpointController - a reference to the endpoint controller

  • Method Details

    • getInstance

      public static EndpointCodeGenerator getInstance()

      Gets the singleton instance.

    • update

      public void update()

      Re-generates the endpoint TypeScript and re-registers the endpoints in Java.

    • findBrowserCallables

      public static List<Class<?>> findBrowserCallables(EngineConfiguration engineConfiguration, org.springframework.context.ApplicationContext applicationContext)

      Finds all beans in the application context that have a browser callable annotation.

      Parameters:

      engineConfiguration - the engine configuration that provides the annotations to search for

      applicationContext - the application context to search for beans in

      Returns:

      a list of classes that qualify as browser callables

    • getClassesUsedInOpenApi

      public Optional<Set<String>> getClassesUsedInOpenApi() throws IOException

      Throws:

      IOException