Uses of Record Class
com.vaadin.copilot.javarewriter.ComponentInfo
Packages that use ComponentInfo
-
Uses of ComponentInfo in com.vaadin.copilot.javarewriter
Methods in com.vaadin.copilot.javarewriter that return ComponentInfoModifier and TypeMethodDescriptionstatic ComponentInfoComponentInfo.find(ComponentTypeAndSourceLocation typeAndSourceLocation, JavaRewriter javaRewriter) Creates ComponentInfo of the given component.JavaRewriter.findComponentInfo(ComponentTypeAndSourceLocation typeAndSourceLocation) Finds a component in the source code.Methods in com.vaadin.copilot.javarewriter with parameters of type ComponentInfoModifier and TypeMethodDescriptionvoidJavaBatchRewriter.Callback.accept(ComponentTypeAndSourceLocation source, ComponentInfo component, JavaRewriter rewriter) voidJavaRewriter.addCall(ComponentInfo componentInfo, String function, Object... parameters) Adds a function call to the source code.static booleanLumoRewriterUtil.addClassNameWithArgs(ComponentInfo component, List<com.github.javaparser.ast.expr.Expression> arguments) Creates addClassNames(...) statement with given arguments if there is none.voidJavaRewriter.addComment(ComponentInfo componentInfo, String comment, JavaRewriter.CommentType commentType) Adds a comment to the specified component in the source code.voidJavaRewriter.addComponentUsingTemplate(ComponentInfo referenceComponent, JavaRewriter.Where where, List<JavaComponent> template, JavaRewriter.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).static com.github.javaparser.ast.expr.MethodCallExprJavaRewriterUtil.addFunctionCall(ComponentInfo componentInfo, String function, List<com.github.javaparser.ast.expr.Expression> parameterExpressions) Adds a function call to the given component.voidJavaRewriter.attachComponent(InsertionPoint insertionPoint, JavaComponent component, JavaComponent parent, String layoutVariableName, ComponentInfo referenceComponent, com.github.javaparser.ast.expr.Expression variableNameExpr, String variableName) List<com.github.javaparser.ast.body.VariableDeclarator> JavaRewriter.createComponentStatements(InsertionPoint insertionPoint, JavaComponent parent, JavaComponent maybeJavaComponent, boolean attach, String layoutVariableName, ComponentInfo referenceComponent, JavaRewriter.AddTemplateOptions options) voidJavaRewriter.createComponentStatements(InsertionPoint insertionPoint, JavaComponent parent, List<JavaComponent> template, String layoutVariableName, ComponentInfo referenceComponent, JavaRewriter.AddTemplateOptions options) booleanJavaRewriter.delete(ComponentInfo componentInfo) Deletes a component from the source code.voidJavaRewriter.duplicate(ComponentInfo component) JavaRewriter.duplicate(ComponentInfo component, boolean handleAdd) Duplicates a component in the source code.JavaRewriterUtil.extractInlineVariableToLocalVariable(ComponentInfo componentInfo) Extracts an inline variable to local variable with a new variable name.static List<com.github.javaparser.ast.expr.MethodCallExpr> JavaRewriterUtil.findCalls(Class<?> classWithMethods, ComponentInfo componentInfo) Find all calls done to methods in the given class through a reference to the given component.static StringJavaRewriterUtil.findFreeVariableName(ComponentInfo componentInfo, com.github.javaparser.ast.stmt.BlockStmt block) Finds a free variable name based on the component type.JavaRewriter.findInsertionPointForAppend(ComponentInfo component, JavaRewriter.Where where) static List<com.github.javaparser.ast.expr.MethodCallExpr> JavaRewriterUtil.findMethodCallNonStatements(ComponentInfo componentDefinition) Finds usage of the variable outside of method call statements, i.e.static List<com.github.javaparser.ast.expr.MethodCallExpr> JavaRewriterUtil.findMethodCalls(ComponentInfo componentInfo) Finds all method calls that are related to the given component.static List<com.github.javaparser.ast.expr.MethodCallExpr> JavaRewriterUtil.findMethodCalls(ComponentInfo componentInfo, com.github.javaparser.ast.Node.TreeTraversal traversalOrder) Finds all method calls that are related to the given component.static List<com.github.javaparser.ast.expr.MethodCallExpr> JavaRewriterUtil.findMethodCallStatements(ComponentInfo componentDefinition) Find all method calls that are statements, i.e.static List<com.github.javaparser.ast.expr.Expression> JavaRewriterUtil.findParameterUsage(ComponentInfo componentDefinition) Find all expressions where the given component is used as a call parameter.static Optional<com.github.javaparser.ast.expr.Expression> JavaRewriterUtil.findReference(com.github.javaparser.ast.NodeList<com.github.javaparser.ast.expr.Expression> nodes, ComponentInfo componentDefinition) Finds a node among the nodes which refer to the given component.static Optional<com.github.javaparser.ast.expr.Expression> JavaRewriterUtil.getAttachArgument(ComponentInfo component) Finds the attach argument reference of the given component.static com.github.javaparser.ast.expr.ExpressionJavaRewriterUtil.getAttachArgumentOrThrow(ComponentInfo component) Find the attach argument reference of given component or throwsIllegalArgumentExceptionif not found.static StringJavaRewriterUtil.getFieldOrVariableName(ComponentInfo componentInfo) Gets the field or local variable name for the given component.JavaRewriter.getPropertyValue(ComponentInfo componentInfo, String property) Gets the (active) value of a property of a component.static Optional<com.github.javaparser.ast.expr.Expression> JavaRewriterUtil.getScopeIgnoreComposite(ComponentInfo componentInfo, com.github.javaparser.ast.expr.MethodCallExpr expr) Returns the scope by ignoring thegetContent()if component is in a composite container.JavaRewriter.getStyles(ComponentInfo componentInfo) Gets the (active) styles of a component.static List<JavaStyleRewriter.StyleInfo> JavaStyleRewriter.getStyles(ComponentInfo componentInfo) Gets the (active) styles of a component.static booleanJavaRewriterUtil.isVariableNameAutoGenerated(ComponentInfo componentInfo, String currentText, String currentLabel) Checks if the given component has a variable name that is auto-generated based on the type/label/text of the component.voidJavaRewriter.moveComponent(ComponentInfo component, ComponentInfo container, ComponentInfo reference, JavaRewriter.Where where) Moves a component in the source code.static StringJavaRewriterUtil.regenerateVariableName(ComponentInfo componentInfo, String newText, String newLabel) Regenerates the variable name for the given component.static voidLumoRewriterUtil.removeClassNameArgs(ComponentInfo component, String... lumoUtilityClassNames) Searches addClassName, addClassNames, setClassName methods for given component and then remove given lumo utility class names.JavaRewriter.replaceFunctionCall(ComponentInfo componentInfo, String function, Object value) Replaces a constructor parameter (if it is mapped to the given setter function) or a function call in the source code.voidJavaRewriter.replaceOrAddCall(ComponentInfo componentInfo, String function, Object... parameters) Replaces a function call in the source code, if found, otherwise adds the function call.voidJavaRewriter.setAlignment(ComponentInfo component, JavaRewriter.AlignmentMode alignmentMode, boolean selected, List<String> lumoClasses) voidJavaRewriter.setGap(ComponentInfo component, String newValue) Sets gap to selected componentvoidJavaRewriter.setPadding(ComponentInfo component, String newClassName) voidJavaRewriter.setSizing(ComponentInfo componentInfo, Map<String, String> changes) Sets sizing properties of the given component using the Style API.static voidJavaStyleRewriter.setSizing(ComponentInfo componentInfo, Map<String, String> changes) Handles calls of the given component and adjust them based on the given properties.voidJavaRewriter.setStyle(ComponentInfo component, String property, String value) Sets the given inline style on the given component, replacing an existing style property if present.static voidJavaStyleRewriter.setStyle(ComponentInfo componentInfo, String dashSeparatedProperty, String value) Sets the given inline style on the given component, replacing an existing style property if present.Method parameters in com.vaadin.copilot.javarewriter with type arguments of type ComponentInfoModifier and TypeMethodDescriptionvoidJavaRewriter.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. -
Uses of ComponentInfo in com.vaadin.copilot.javarewriter.custom
Methods in com.vaadin.copilot.javarewriter.custom with parameters of type ComponentInfoModifier and TypeMethodDescriptionList<com.github.javaparser.ast.body.VariableDeclarator> CrudComponentHandle.createComponentStatements(JavaRewriter javaRewriter, JavaComponent component, InsertionPoint insertionPoint, JavaComponent parent, String layoutVariableName, ComponentInfo referenceComponent, JavaRewriter.AddTemplateOptions options) abstract List<com.github.javaparser.ast.body.VariableDeclarator> CustomComponentHandle.createComponentStatements(JavaRewriter javaRewriter, JavaComponent component, InsertionPoint insertionPoint, JavaComponent parent, String layoutVariableName, ComponentInfo referenceComponent, JavaRewriter.AddTemplateOptions options) List<com.github.javaparser.ast.body.VariableDeclarator> DetailsComponentHandle.createComponentStatements(JavaRewriter javaRewriter, JavaComponent component, InsertionPoint insertionPoint, JavaComponent parent, String layoutVariableName, ComponentInfo referenceComponent, JavaRewriter.AddTemplateOptions options)