Uses of Record Class
com.vaadin.copilot.rewriter.CopilotComponent
Packages that use CopilotComponent
Package
Description
-
Uses of CopilotComponent in com.vaadin.copilot.javarewriter
Methods in com.vaadin.copilot.javarewriter that return CopilotComponentModifier and TypeMethodDescriptionJavaRewriterCopyPasteHandler.getCopiedCopilotComponent(JavaFileSourceProvider javaFileSourceProvider, ComponentTypeAndSourceLocation componentTypeAndSourceLocation, ExceptionReportCreator exceptionReportCreator, ComponentSourceFinder sourceFinder) Collects required data for copying and pasting a componentMethods in com.vaadin.copilot.javarewriter that return types with arguments of type CopilotComponentModifier and TypeMethodDescriptionstatic List<CopilotComponent> FlowComponentQuirks.getMethodCallChildren(CopilotComponent copilotComponent) Returns the list of children of the given CopilotComponent that should be added as method callsMethods in com.vaadin.copilot.javarewriter with parameters of type CopilotComponentModifier and TypeMethodDescriptionJavaRewriter.attachComponent(InsertionPoint insertionPoint, CopilotComponent component, CopilotComponent parent, String layoutVariableName, ComponentInfo referenceComponent, com.github.javaparser.ast.expr.Expression variableNameExpr, String variableName, AddTemplateOptions options, Where where) JavaRewriter.attachComponent(InsertionPoint insertionPoint, CopilotComponent component, CopilotComponent parent, String layoutVariableName, ComponentInfo referenceComponent, com.github.javaparser.ast.expr.Expression variableNameExpr, String variableName, AddTemplateOptions options, Where where, com.github.javaparser.ast.expr.ObjectCreationExpr initializer) static booleanFlowComponentQuirks.childrenGeneratesData(CopilotComponent parent, CopilotComponent child) Returns true if child is not a component but an item that is used in DataProvider.static com.github.javaparser.ast.expr.ObjectCreationExprJavaRewriterUtil.createComponentConstructor(CopilotComponent copilotComponent, com.github.javaparser.ast.type.ClassOrInterfaceType componentType, String dataEntityRecordName, Consumer<String> importAdder) Creates the convenient component constructor for a new CopilotComponent to be added to the code.JavaRewriter.createComponentStatements(InsertionPoint insertionPoint, CopilotComponent parent, CopilotComponent maybeCopilotComponent, boolean attach, String layoutVariableName, ComponentInfo referenceComponent, AddTemplateOptions options, Where where, JavaSource javaSource) JavaRewriter.createComponentStatements(InsertionPoint insertionPoint, CopilotComponent parent, List<CopilotComponent> template, String layoutVariableName, ComponentInfo referenceComponent, AddTemplateOptions options, Where where, JavaSource javaSource) static StringJavaRewriterUtil.generateVariableName(CopilotComponent copilotComponent, com.github.javaparser.ast.type.ClassOrInterfaceType type, InsertionPoint insertionPoint) Provides a free name to be used when adding a new component.static StringFlowComponentQuirks.getClassForComponent(CopilotComponent copilotComponent) Returns the Java class name for a given HTML tag.FlowComponentQuirks.getClassHierarchy(CopilotComponent copilotComponent) static List<CopilotComponent> FlowComponentQuirks.getMethodCallChildren(CopilotComponent copilotComponent) Returns the list of children of the given CopilotComponent that should be added as method callsstatic List<com.github.javaparser.ast.expr.MethodCallExpr> FlowComponentQuirks.getMethodCallExprFromComponent(com.github.javaparser.ast.CompilationUnit compilationUnit, CopilotComponent child, com.github.javaparser.ast.expr.Expression owner, String dataEntityRecordName) Returns the MethodCallExpr to be added to the owner object for the given CopilotComponentstatic com.github.javaparser.ast.expr.ExpressionFlowComponentQuirks.getPropertySetExpression(CopilotComponent copilotComponent, String parentSetterName, String setterName, Object value, com.github.javaparser.ast.expr.Expression owner, InsertionPoint insertionPoint) Returns the expression to be used to set a property in a CopilotComponent.static StringFlowComponentQuirks.getSetterNameFromComponent(CopilotComponent child) Returns the name of the setter method to be called on the owner object for the given CopilotComponentstatic voidJavaDataProviderHandler.handleDataStatementsAndClearDataProps(com.github.javaparser.ast.CompilationUnit compilationUnit, JavaDataProviderHandler.FieldOrVariable parent, CopilotComponent copilotComponent, InsertionPoint insertionPoint, String dataEntityRecordName) Creates the data statements when adding a new template e.g.setItems,setItemLabelGeneratoretc... and clears children or props if they are definition of data instead of real components.static booleanFlowComponentQuirks.hasSetItemsMethod(CopilotComponent component) static booleanFlowComponentQuirks.hasSetItemsProps(CopilotComponent component) Checks the given component has items property and supported.voidJavaRewriter.insertSetter(InsertionPoint insertionPoint, com.github.javaparser.ast.expr.Expression owner, String setterName, Object value, CopilotComponent copilotComponent, JavaSource javaSource) Insert setters for given java component.static booleanFlowComponentQuirks.isGridColumnAttribute(CopilotComponent component) Returns true when the java component indicates a Grid attribute according to Hilla React template.static booleanFlowComponentQuirks.isGridColumnDefinition(CopilotComponent component) Returns true when the java component indicates a Grid column definition according to Hilla React template.static booleanFlowComponentQuirks.isGridTreeColumnDefinition(CopilotComponent component) Returns true when the java component indicates a Tree Grid column definition according to Hilla React template.static booleanFlowComponentQuirks.isTabSheetDefinition(CopilotComponent component) static voidFlowComponentQuirks.menuBarInsertItemsPropsToAddItem(CopilotComponent copilotComponent, InsertionPoint insertionPoint, com.github.javaparser.ast.expr.Expression owner, com.github.javaparser.ast.expr.Expression parent, String setterName, Object value, boolean submenu) Specific method to handle MenuBar items property.voidJavaRewriter.mergeAndReplace(List<ComponentInfo> components, CopilotComponent wrapperComponent) Merges all the components and wraps them using the given component and places the result in place of the first component.static booleanFlowComponentQuirks.skipProps(CopilotComponent component, String propKey) Method parameters in com.vaadin.copilot.javarewriter with type arguments of type CopilotComponentModifier and TypeMethodDescriptionJavaRewriter.addComponentUsingTemplate(ComponentInfo referenceComponent, Where where, List<CopilotComponent> template, AddTemplateOptions options) Adds the given code snippet to the source code either before the reference component (Where.BEFORE) or by appending to the layout (Where.APPEND).JavaRewriter.createComponentStatements(InsertionPoint insertionPoint, CopilotComponent parent, List<CopilotComponent> template, String layoutVariableName, ComponentInfo referenceComponent, AddTemplateOptions options, Where where, JavaSource javaSource) booleanJavaRewriter.importLitTemplate(JavaSource litTemplateSource, List<CopilotComponent> componentDefinitions) Imports the given components that come from a lit template into the given LitTemplate Java class.booleanJavaRewriter.importLitTemplate(JavaSource litTemplateSource, List<CopilotComponent> componentDefinitions, String cssClassName) Imports the given components that come from a lit template into the given LitTemplate Java class. -
Uses of CopilotComponent in com.vaadin.copilot.javarewriter.custom
Methods in com.vaadin.copilot.javarewriter.custom with parameters of type CopilotComponentModifier and TypeMethodDescriptionList<com.github.javaparser.ast.body.VariableDeclarator> CrudComponentHandle.createComponentStatements(JavaRewriter javaRewriter, CopilotComponent component, InsertionPoint insertionPoint, CopilotComponent parent, String layoutVariableName, ComponentInfo referenceComponent, AddTemplateOptions options, JavaSource javaSource) abstract List<com.github.javaparser.ast.body.VariableDeclarator> CustomComponentHandle.createComponentStatements(JavaRewriter javaRewriter, CopilotComponent component, InsertionPoint insertionPoint, CopilotComponent parent, String layoutVariableName, ComponentInfo referenceComponent, AddTemplateOptions options, JavaSource javaSource) List<com.github.javaparser.ast.body.VariableDeclarator> DashboardComponentHandle.createComponentStatements(JavaRewriter javaRewriter, CopilotComponent component, InsertionPoint insertionPoint, CopilotComponent parent, String layoutVariableName, ComponentInfo referenceComponent, AddTemplateOptions options, JavaSource javaSource) List<com.github.javaparser.ast.body.VariableDeclarator> DetailsComponentHandle.createComponentStatements(JavaRewriter javaRewriter, CopilotComponent component, InsertionPoint insertionPoint, CopilotComponent parent, String layoutVariableName, ComponentInfo referenceComponent, AddTemplateOptions options, JavaSource javaSource) static Optional<CustomComponentHandle> CustomComponentHandler.get(CopilotComponent copilotComponent) Finds the relevant CustomComponentHandle of the given CopilotComponentprotected voidCustomComponentHandle.insertSetter(CopilotComponent copilotComponent, com.github.javaparser.ast.expr.ObjectCreationExpr constructor, JavaRewriter javaRewriter, String componentClassName, InsertionPoint insertionPoint, com.github.javaparser.ast.expr.NameExpr variableNameExpr, JavaSource javaSource) protected booleanCustomComponentHandle.skipProps(CopilotComponent component, String prop) protected booleanDetailsComponentHandle.skipProps(CopilotComponent component, String prop) -
Uses of CopilotComponent in com.vaadin.copilot.kotlinrewriter
Methods in com.vaadin.copilot.kotlinrewriter with parameters of type CopilotComponentModifier and TypeMethodDescriptionvoidKotlinRewriter.mergeAndReplace(List<KotlinComponentInfo> components, CopilotComponent wrapperComponent) Method parameters in com.vaadin.copilot.kotlinrewriter with type arguments of type CopilotComponentModifier and TypeMethodDescriptionKotlinRewriter.addComponentUsingTemplate(KotlinComponentInfo referenceComponent, Where where, List<CopilotComponent> template, AddTemplateOptions options) -
Uses of CopilotComponent in com.vaadin.copilot.rewriter
Methods in com.vaadin.copilot.rewriter that return CopilotComponentModifier and TypeMethodDescriptionstatic CopilotComponentCopilotComponent.componentFromJson(tools.jackson.databind.JsonNode json) Creates a new CopilotComponent instance from a JSON object.Methods in com.vaadin.copilot.rewriter that return types with arguments of type CopilotComponentModifier and TypeMethodDescriptionCopilotComponent.children()Returns the value of thechildrenrecord component.static List<CopilotComponent> CopilotComponent.componentsFromJson(tools.jackson.databind.node.ArrayNode template) Creates a new CopilotComponent instance from a JSON array.Methods in com.vaadin.copilot.rewriter with parameters of type CopilotComponentModifier and TypeMethodDescriptionvoidCopilotRewriter.mergeAndReplace(List<C> components, CopilotComponent wrapperComponent) Wraps the given components in a new container.Method parameters in com.vaadin.copilot.rewriter with type arguments of type CopilotComponentModifier and TypeMethodDescriptionCopilotRewriter.addComponentUsingTemplate(C referenceComponent, Where where, List<CopilotComponent> template, AddTemplateOptions options) Adds components described by a template, as sent when dropping from the palette, pasting, or importing a design.Constructor parameters in com.vaadin.copilot.rewriter with type arguments of type CopilotComponentModifierConstructorDescriptionCopilotComponent(String tag, String className, Map<String, Object> props, List<CopilotComponent> children) CopilotComponent(String tag, String className, Map<String, Object> props, List<CopilotComponent> children, CopilotComponent.Metadata metadata) Creates an instance of aCopilotComponentrecord class.