Package dev.hilla

Class EndpointCodeGenerator

java.lang.Object
dev.hilla.EndpointCodeGenerator

@Component public class EndpointCodeGenerator extends Object
Handles (re)generation of the TypeScript code.
  • Constructor Details

    • EndpointCodeGenerator

      public EndpointCodeGenerator(com.vaadin.flow.server.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() throws IOException
      Re-generates the endpoint TypeScript and re-registers the endpoints in Java.
      Throws:
      IOException - if something went wrong
    • getClassesUsedInOpenApi

      public Set<String> getClassesUsedInOpenApi() throws IOException
      Throws:
      IOException