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) booleanJavaRewriter.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.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).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.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.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.voidJavaRewriter.moveComponent(ComponentInfo component, ComponentInfo container, ComponentInfo reference, JavaRewriter.Where where) Moves a component in the source code.static voidLumoRewriterUtil.removeClassNameArgs(ComponentInfo component, String... lumoUtilityClassNames) Searches addClassName, addClassNames, setClassName methods for given component and then remove given lumo utility class names.booleanJavaRewriter.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.booleanJavaRewriter.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.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.