Package com.vaadin.copilot.javarewriter
Record Class JavaRewriter.DuplicateInfo
java.lang.Object
java.lang.Record
com.vaadin.copilot.javarewriter.JavaRewriter.DuplicateInfo
- Record Components:
nameMapping
- a map from old component name to new component namechildAddCalls
- a list of add calls from the parent to ddd childrenvariableDeclaration
- the variable declaration of the new component when it is declared as local variable to manage children attachment in constructorassignExpr
- the assign expression of the new component when it is declared as field to manage children attachment in constructor
- Enclosing class:
- JavaRewriter
public static record JavaRewriter.DuplicateInfo(Map<String,String> nameMapping, List<com.github.javaparser.ast.expr.MethodCallExpr> childAddCalls, com.github.javaparser.ast.expr.VariableDeclarationExpr variableDeclaration, com.github.javaparser.ast.expr.AssignExpr assignExpr)
extends Record
The result of a duplicate operation
-
Constructor Summary
ConstructorsConstructorDescriptionDuplicateInfo
(Map<String, String> nameMapping, List<com.github.javaparser.ast.expr.MethodCallExpr> childAddCalls, com.github.javaparser.ast.expr.VariableDeclarationExpr variableDeclaration, com.github.javaparser.ast.expr.AssignExpr assignExpr) Creates an instance of aDuplicateInfo
record class. -
Method Summary
Modifier and TypeMethodDescriptioncom.github.javaparser.ast.expr.AssignExpr
Returns the value of theassignExpr
record component.List<com.github.javaparser.ast.expr.MethodCallExpr>
Returns the value of thechildAddCalls
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of thenameMapping
record component.final String
toString()
Returns a string representation of this record class.com.github.javaparser.ast.expr.VariableDeclarationExpr
Returns the value of thevariableDeclaration
record component.
-
Constructor Details
-
DuplicateInfo
public DuplicateInfo(Map<String, String> nameMapping, List<com.github.javaparser.ast.expr.MethodCallExpr> childAddCalls, com.github.javaparser.ast.expr.VariableDeclarationExpr variableDeclaration, com.github.javaparser.ast.expr.AssignExpr assignExpr) Creates an instance of aDuplicateInfo
record class.- Parameters:
nameMapping
- the value for thenameMapping
record componentchildAddCalls
- the value for thechildAddCalls
record componentvariableDeclaration
- the value for thevariableDeclaration
record componentassignExpr
- the value for theassignExpr
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
nameMapping
Returns the value of thenameMapping
record component.- Returns:
- the value of the
nameMapping
record component
-
childAddCalls
Returns the value of thechildAddCalls
record component.- Returns:
- the value of the
childAddCalls
record component
-
variableDeclaration
public com.github.javaparser.ast.expr.VariableDeclarationExpr variableDeclaration()Returns the value of thevariableDeclaration
record component.- Returns:
- the value of the
variableDeclaration
record component
-
assignExpr
public com.github.javaparser.ast.expr.AssignExpr assignExpr()Returns the value of theassignExpr
record component.- Returns:
- the value of the
assignExpr
record component
-