Class UIServiceCreator

java.lang.Object
com.vaadin.copilot.UIServiceCreator

public class UIServiceCreator extends Object
UIServiceCreator is responsible for generating Java service and bean classes dynamically. It supports different data storage types and provides functionality for creating Java classes with fields, getters, and setters.

This class utilizes JavaParser for AST modifications and dynamically writes Java files to the project structure.

  • Constructor Details

    • UIServiceCreator

      public UIServiceCreator()
  • Method Details

    • createServiceAndBean

      public boolean createServiceAndBean(UIServiceCreator.ServiceAndBeanInfo serviceAndBeanInfo, JavaSourcePathDetector.ModuleInfo moduleInfo) throws IOException
      Creates a service and bean based on the provided ServiceAndBeanInfo.
      Parameters:
      serviceAndBeanInfo - the information about the service and bean to create
      moduleInfo - the module to create the file in
      Returns:
      true if a restart is needed, false otherwise
      Throws:
      IOException - if an I/O error occurs