Package com.vaadin.copilot.rewriter
Interface ComponentRef
- All Known Implementing Classes:
ComponentInfo,KotlinComponentInfo
public interface ComponentRef
A component resolved to its place in the project's source, as seen by callers
outside the rewriter.
The Java implementation of this is a record full of JavaParser nodes. Rather than make that model language-neutral — which would mean rewriting it — this interface makes it opaque: the handlers, the property panel and the i18n plugin ask the questions they actually have, and the parse tree stays behind the rewriter that owns it.
-
Method Details
-
type
Class<? extends com.vaadin.flow.component.Component> type()- Returns:
- the component's runtime type, taken from the live instance rather than parsed from source
-
isReturnValue
boolean isReturnValue()- Returns:
- true if the component is returned from a method rather than attached where it is created
-
typeWithGenerics
String typeWithGenerics()The component's type as it should be written in source, including any generic parameters that the declaration carries.- Returns:
- the type name
-