Package com.vaadin.copilot.javarewriter
Record Class ComponentInfo
java.lang.Object
java.lang.Record
com.vaadin.copilot.javarewriter.ComponentInfo
public record ComponentInfo(Class<? extends Component> type, com.github.javaparser.ast.expr.ObjectCreationExpr objectCreationExpr, com.github.javaparser.ast.stmt.BlockStmt componentCreateScope, AttachExpression attachCall, com.github.javaparser.ast.stmt.BlockStmt componentAttachScope, com.github.javaparser.ast.body.VariableDeclarator localVariableDeclarator, com.github.javaparser.ast.expr.AssignExpr assignmentExpression, com.github.javaparser.ast.body.FieldDeclaration fieldDeclaration, com.github.javaparser.ast.body.FieldDeclaration fieldDeclarationAndAssignment, String localVariableName, String fieldName, com.github.javaparser.ast.body.ConstructorDeclaration routeConstructor, boolean containerComposite, boolean isAnonymousComponent, boolean isReturnValue, JavaRewriter rewriter)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionComponentInfo(Class<? extends Component> type, com.github.javaparser.ast.expr.ObjectCreationExpr objectCreationExpr, com.github.javaparser.ast.stmt.BlockStmt componentCreateScope, AttachExpression attachCall, com.github.javaparser.ast.stmt.BlockStmt componentAttachScope, com.github.javaparser.ast.body.VariableDeclarator localVariableDeclarator, com.github.javaparser.ast.expr.AssignExpr assignmentExpression, com.github.javaparser.ast.body.FieldDeclaration fieldDeclaration, com.github.javaparser.ast.body.FieldDeclaration fieldDeclarationAndAssignment, String localVariableName, String fieldName, com.github.javaparser.ast.body.ConstructorDeclaration routeConstructor, boolean containerComposite, boolean isAnonymousComponent, boolean isReturnValue, JavaRewriter rewriter) Creates an instance of aComponentInforecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.github.javaparser.ast.expr.AssignExprReturns the value of theassignmentExpressionrecord component.Returns the value of theattachCallrecord component.com.github.javaparser.ast.stmt.BlockStmtReturns the value of thecomponentAttachScoperecord component.com.github.javaparser.ast.stmt.BlockStmtReturns the value of thecomponentCreateScoperecord component.booleanReturns the value of thecontainerCompositerecord component.final booleanIndicates whether some other object is "equal to" this one.com.github.javaparser.ast.body.FieldDeclarationReturns the value of thefieldDeclarationrecord component.com.github.javaparser.ast.body.FieldDeclarationReturns the value of thefieldDeclarationAndAssignmentrecord component.Returns the value of thefieldNamerecord component.static ComponentInfofind(ComponentTypeAndSourceLocation typeAndSourceLocation, JavaRewriter javaRewriter) Creates ComponentInfo of the given component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisAnonymousComponentrecord component.booleanReturns the value of theisReturnValuerecord component.com.github.javaparser.ast.body.VariableDeclaratorReturns the value of thelocalVariableDeclaratorrecord component.Returns the value of thelocalVariableNamerecord component.com.github.javaparser.ast.expr.ObjectCreationExprReturns the value of theobjectCreationExprrecord component.rewriter()Returns the value of therewriterrecord component.com.github.javaparser.ast.body.ConstructorDeclarationReturns the value of therouteConstructorrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
ComponentInfo
public ComponentInfo(Class<? extends Component> type, com.github.javaparser.ast.expr.ObjectCreationExpr objectCreationExpr, com.github.javaparser.ast.stmt.BlockStmt componentCreateScope, AttachExpression attachCall, com.github.javaparser.ast.stmt.BlockStmt componentAttachScope, com.github.javaparser.ast.body.VariableDeclarator localVariableDeclarator, com.github.javaparser.ast.expr.AssignExpr assignmentExpression, com.github.javaparser.ast.body.FieldDeclaration fieldDeclaration, com.github.javaparser.ast.body.FieldDeclaration fieldDeclarationAndAssignment, String localVariableName, String fieldName, com.github.javaparser.ast.body.ConstructorDeclaration routeConstructor, boolean containerComposite, boolean isAnonymousComponent, boolean isReturnValue, JavaRewriter rewriter) Creates an instance of aComponentInforecord class.- Parameters:
type- the value for thetyperecord componentobjectCreationExpr- the value for theobjectCreationExprrecord componentcomponentCreateScope- the value for thecomponentCreateScoperecord componentattachCall- the value for theattachCallrecord componentcomponentAttachScope- the value for thecomponentAttachScoperecord componentlocalVariableDeclarator- the value for thelocalVariableDeclaratorrecord componentassignmentExpression- the value for theassignmentExpressionrecord componentfieldDeclaration- the value for thefieldDeclarationrecord componentfieldDeclarationAndAssignment- the value for thefieldDeclarationAndAssignmentrecord componentlocalVariableName- the value for thelocalVariableNamerecord componentfieldName- the value for thefieldNamerecord componentrouteConstructor- the value for therouteConstructorrecord componentcontainerComposite- the value for thecontainerCompositerecord componentisAnonymousComponent- the value for theisAnonymousComponentrecord componentisReturnValue- the value for theisReturnValuerecord componentrewriter- the value for therewriterrecord component
-
-
Method Details
-
find
public static ComponentInfo find(ComponentTypeAndSourceLocation typeAndSourceLocation, JavaRewriter javaRewriter) Creates ComponentInfo of the given component.- Parameters:
typeAndSourceLocation- Type and source location of a componentjavaRewriter- JavaRewriter class of the given component.- Returns:
- Component info if every argument is found well. Throws
IllegalArgumentExceptionfor unknown statements.
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
objectCreationExpr
public com.github.javaparser.ast.expr.ObjectCreationExpr objectCreationExpr()Returns the value of theobjectCreationExprrecord component.- Returns:
- the value of the
objectCreationExprrecord component
-
componentCreateScope
public com.github.javaparser.ast.stmt.BlockStmt componentCreateScope()Returns the value of thecomponentCreateScoperecord component.- Returns:
- the value of the
componentCreateScoperecord component
-
attachCall
Returns the value of theattachCallrecord component.- Returns:
- the value of the
attachCallrecord component
-
componentAttachScope
public com.github.javaparser.ast.stmt.BlockStmt componentAttachScope()Returns the value of thecomponentAttachScoperecord component.- Returns:
- the value of the
componentAttachScoperecord component
-
localVariableDeclarator
public com.github.javaparser.ast.body.VariableDeclarator localVariableDeclarator()Returns the value of thelocalVariableDeclaratorrecord component.- Returns:
- the value of the
localVariableDeclaratorrecord component
-
assignmentExpression
public com.github.javaparser.ast.expr.AssignExpr assignmentExpression()Returns the value of theassignmentExpressionrecord component.- Returns:
- the value of the
assignmentExpressionrecord component
-
fieldDeclaration
public com.github.javaparser.ast.body.FieldDeclaration fieldDeclaration()Returns the value of thefieldDeclarationrecord component.- Returns:
- the value of the
fieldDeclarationrecord component
-
fieldDeclarationAndAssignment
public com.github.javaparser.ast.body.FieldDeclaration fieldDeclarationAndAssignment()Returns the value of thefieldDeclarationAndAssignmentrecord component.- Returns:
- the value of the
fieldDeclarationAndAssignmentrecord component
-
localVariableName
Returns the value of thelocalVariableNamerecord component.- Returns:
- the value of the
localVariableNamerecord component
-
fieldName
Returns the value of thefieldNamerecord component.- Returns:
- the value of the
fieldNamerecord component
-
routeConstructor
public com.github.javaparser.ast.body.ConstructorDeclaration routeConstructor()Returns the value of therouteConstructorrecord component.- Returns:
- the value of the
routeConstructorrecord component
-
containerComposite
public boolean containerComposite()Returns the value of thecontainerCompositerecord component.- Returns:
- the value of the
containerCompositerecord component
-
isAnonymousComponent
public boolean isAnonymousComponent()Returns the value of theisAnonymousComponentrecord component.- Returns:
- the value of the
isAnonymousComponentrecord component
-
isReturnValue
public boolean isReturnValue()Returns the value of theisReturnValuerecord component.- Returns:
- the value of the
isReturnValuerecord component
-
rewriter
Returns the value of therewriterrecord component.- Returns:
- the value of the
rewriterrecord component
-