Uses of Record Class
com.vaadin.copilot.javarewriter.JavaComponent
Packages that use JavaComponent
-
Uses of JavaComponent in com.vaadin.copilot.javarewriter
Methods in com.vaadin.copilot.javarewriter that return JavaComponentModifier and TypeMethodDescriptionstatic JavaComponent
JavaComponent.componentFromJson
(elemental.json.JsonObject json) Creates a new JavaComponent instance from a JSON object.Methods in com.vaadin.copilot.javarewriter that return types with arguments of type JavaComponentModifier and TypeMethodDescriptionJavaComponent.children()
Returns the value of thechildren
record component.static List<JavaComponent>
JavaComponent.componentsFromJson
(elemental.json.JsonArray template) Creates a new JavaComponent instance from a JSON array.static List<JavaComponent>
FlowComponentQuirks.getMethodCallChildren
(JavaComponent javaComponent) Returns the list of children of the given JavaComponent that should be added as method callsMethods in com.vaadin.copilot.javarewriter with parameters of type JavaComponentModifier and TypeMethodDescriptionvoid
JavaRewriter.attachComponent
(InsertionPoint insertionPoint, JavaComponent component, JavaComponent parent, String layoutVariableName, ComponentInfo referenceComponent, com.github.javaparser.ast.expr.NameExpr variableNameExpr, String variableName) static boolean
FlowComponentQuirks.childrenGeneratesData
(JavaComponent parent, JavaComponent child) Returns true if child is not a component but an item that is used in DataProvider.static com.github.javaparser.ast.expr.ObjectCreationExpr
JavaRewriterUtil.createComponentConstructor
(JavaComponent javaComponent, com.github.javaparser.ast.type.ClassOrInterfaceType componentType, String dataEntityRecordName, Consumer<String> importAdder) Creates the convenient component constructor for a new JavaComponent to be added to the code.List<com.github.javaparser.ast.body.VariableDeclarator>
JavaRewriter.createComponentStatements
(InsertionPoint insertionPoint, JavaComponent parent, JavaComponent maybeJavaComponent, boolean attach, String layoutVariableName, ComponentInfo referenceComponent) void
JavaRewriter.createComponentStatements
(InsertionPoint insertionPoint, JavaComponent parent, List<JavaComponent> template, String layoutVariableName, ComponentInfo referenceComponent) static String
FlowComponentQuirks.getClassForComponent
(JavaComponent javaComponent) Returns the Java class name for a given HTML tag.static List<JavaComponent>
FlowComponentQuirks.getMethodCallChildren
(JavaComponent javaComponent) Returns the list of children of the given JavaComponent that should be added as method callsstatic List<com.github.javaparser.ast.expr.MethodCallExpr>
FlowComponentQuirks.getMethodCallExprFromComponent
(com.github.javaparser.ast.CompilationUnit compilationUnit, JavaComponent child, com.github.javaparser.ast.expr.NameExpr owner, String dataEntityRecordName) Returns the MethodCallExpr to be added to the owner object for the given JavaComponentstatic String
JavaRewriterUtil.getNewComponentName
(JavaComponent javaComponent, com.github.javaparser.ast.type.ClassOrInterfaceType type, InsertionPoint insertionPoint) Provides a free name to be used when adding a new component.static com.github.javaparser.ast.expr.Expression
FlowComponentQuirks.getPropertySetExpression
(com.github.javaparser.ast.CompilationUnit compilationUnit, JavaComponent javaComponent, 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 JavaComponent.static String
FlowComponentQuirks.getSetterNameFromComponent
(JavaComponent child) Returns the name of the setter method to be called on the owner object for the given JavaComponentstatic void
JavaDataProviderHandler.handleDataStatementsAndClearDataProps
(com.github.javaparser.ast.CompilationUnit compilationUnit, com.github.javaparser.ast.body.VariableDeclarator parent, JavaComponent javaComponent, InsertionPoint insertionPoint, String dataEntityRecordName) Creates the data statements when adding a new template e.g.setItems
,setItemLabelGenerator
etc...static boolean
FlowComponentQuirks.hasSetItemsProps
(JavaComponent component) Checks the given component has items property and supported.void
JavaRewriter.insertSetter
(InsertionPoint insertionPoint, com.github.javaparser.ast.expr.Expression owner, String setterName, Object value, com.github.javaparser.ast.CompilationUnit compilationUnit, JavaComponent javaComponent) Insert setters for given java component.static boolean
FlowComponentQuirks.isGridColumnAttribute
(JavaComponent component) Returns true when the java component indicates a Grid attribute according to Hilla React template.static boolean
FlowComponentQuirks.isGridColumnDefinition
(JavaComponent component) Returns true when the java component indicates a Grid column definition according to Hilla React template.static boolean
FlowComponentQuirks.isGridTreeColumnDefinition
(JavaComponent component) Returns true when the java component indicates a Tree Grid column definition according to Hilla React template.static boolean
FlowComponentQuirks.isTabSheetDefinition
(JavaComponent component) static void
FlowComponentQuirks.menuBarInsertItemsPropsToAddItem
(JavaComponent javaComponent, 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.void
JavaRewriter.mergeAndReplace
(List<ComponentInfo> components, JavaComponent wrapperComponent) Merges all the components and wraps them using the given component and places the result in place of the first component.static boolean
FlowComponentQuirks.skipProps
(JavaComponent component, String propKey) Method parameters in com.vaadin.copilot.javarewriter with type arguments of type JavaComponentModifier and TypeMethodDescriptionvoid
JavaRewriter.addComponentUsingTemplate
(ComponentInfo referenceComponent, JavaRewriter.Where where, List<JavaComponent> template) Adds the given code snippet to the source code either before the reference component (Where.BEFORE) or by appending to the layout (Where.APPEND).void
JavaRewriter.createComponentStatements
(InsertionPoint insertionPoint, JavaComponent parent, List<JavaComponent> template, String layoutVariableName, ComponentInfo referenceComponent) Constructor parameters in com.vaadin.copilot.javarewriter with type arguments of type JavaComponentModifierConstructorDescriptionJavaComponent
(String tag, String className, Map<String, Object> props, List<JavaComponent> children) Creates an instance of aJavaComponent
record class. -
Uses of JavaComponent in com.vaadin.copilot.javarewriter.custom
Methods in com.vaadin.copilot.javarewriter.custom with parameters of type JavaComponentModifier and TypeMethodDescriptionList<com.github.javaparser.ast.body.VariableDeclarator>
CrudComponentHandle.createComponentStatements
(JavaRewriter javaRewriter, JavaComponent component, InsertionPoint insertionPoint, JavaComponent parent, String layoutVariableName, ComponentInfo referenceComponent) abstract List<com.github.javaparser.ast.body.VariableDeclarator>
CustomComponentHandle.createComponentStatements
(JavaRewriter javaRewriter, JavaComponent component, InsertionPoint insertionPoint, JavaComponent parent, String layoutVariableName, ComponentInfo referenceComponent) List<com.github.javaparser.ast.body.VariableDeclarator>
DetailsComponentHandle.createComponentStatements
(JavaRewriter javaRewriter, JavaComponent component, InsertionPoint insertionPoint, JavaComponent parent, String layoutVariableName, ComponentInfo referenceComponent) static Optional<CustomComponentHandle>
CustomComponentHandler.get
(JavaComponent javaComponent) Finds the relevant CustomComponentHandle of the given JavaComponentprotected void
CustomComponentHandle.insertSetter
(JavaComponent javaComponent, com.github.javaparser.ast.expr.ObjectCreationExpr constructor, JavaRewriter javaRewriter, String componentClassName, InsertionPoint insertionPoint, com.github.javaparser.ast.expr.NameExpr variableNameExpr) protected boolean
CustomComponentHandle.skipProps
(JavaComponent component, String prop) protected boolean
DetailsComponentHandle.skipProps
(JavaComponent component, String prop)