Package com.vaadin.copilot
Class UIServiceCreator
java.lang.Object
com.vaadin.copilot.UIServiceCreator
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents information about a Java bean.static enumstatic final recordRepresents information about a field in a Java bean.static final recordRepresents information about a service and its associated bean. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancreateServiceAndBean(UIServiceCreator.ServiceAndBeanInfo serviceAndBeanInfo, JavaSourcePathDetector.ModuleInfo moduleInfo) Creates a service and bean based on the provided ServiceAndBeanInfo.
-
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 createmoduleInfo- the module to create the file in- Returns:
- true if a restart is needed, false otherwise
- Throws:
IOException- if an I/O error occurs
-