Package com.vaadin.copilot.javarewriter
Class ClassSourceStaticAnalyzer
java.lang.Object
com.vaadin.copilot.javarewriter.ClassSourceStaticAnalyzer
Static source file parser for the given component class. See
findCreateLocationCandidateOrThrow(VaadinSession)-
Constructor Summary
ConstructorsConstructorDescriptionClassSourceStaticAnalyzer(ComponentSourceFinder sourceFinder, com.vaadin.flow.component.Component component, File file) Constructs aClassSourceStaticAnalyzer -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.component.internal.ComponentTracker.LocationfindCreateLocationCandidateOrThrow(com.vaadin.flow.server.VaadinSession vaadinSession) Determines the candidate create location.
-
Constructor Details
-
ClassSourceStaticAnalyzer
public ClassSourceStaticAnalyzer(ComponentSourceFinder sourceFinder, com.vaadin.flow.component.Component component, File file) Constructs aClassSourceStaticAnalyzer- Parameters:
sourceFinder- to get children of the given component if necessarycomponent- Component instance that is created withfile- Source file of the component
-
-
Method Details
-
findCreateLocationCandidateOrThrow
public com.vaadin.flow.component.internal.ComponentTracker.Location findCreateLocationCandidateOrThrow(com.vaadin.flow.server.VaadinSession vaadinSession) throws IOException Determines the candidate create location. There are three ways to find the candidate, it is done in the following order:- Using the reference of children create locations to find candidate constructor
- Returning default constructor if present
- Returning class declaration as fallback
- Returns:
- Create location of the given source file
- Throws:
IOException- thrown if file operation fails
-