You're viewing an older version of Vaadin JavaDoc. Please see version 24.7.0 for the latest.
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, Optional<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

    Constructors
    Constructor
    Description
    ComponentInfo(Class<? extends Component> type, com.github.javaparser.ast.expr.ObjectCreationExpr objectCreationExpr, com.github.javaparser.ast.stmt.BlockStmt componentCreateScope, AttachExpression attachCall, Optional<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 a ComponentInfo record class.

  • Method Summary

    Modifier and Type
    Method
    Description
    com.github.javaparser.ast.expr.AssignExpr

    Returns the value of the assignmentExpression record component.

    Returns the value of the attachCall record component.

    Optional<com.github.javaparser.ast.stmt.BlockStmt>

    Returns the value of the componentAttachScope record component.

    com.github.javaparser.ast.stmt.BlockStmt

    Returns the value of the componentCreateScope record component.

    boolean

    Returns the value of the containerComposite record component.

    final boolean

    Indicates whether some other object is "equal to" this one.

    com.github.javaparser.ast.body.FieldDeclaration

    Returns the value of the fieldDeclaration record component.

    com.github.javaparser.ast.body.FieldDeclaration

    Returns the value of the fieldDeclarationAndAssignment record component.

    Returns the value of the fieldName record component.

    find(ComponentTypeAndSourceLocation typeAndSourceLocation, JavaRewriter javaRewriter)

    Creates ComponentInfo of the given component.

    com.github.javaparser.ast.body.VariableDeclarator

    Gets the variable declarator of the component, either for the local variable or field.

    final int

    Returns a hash code value for this object.

    boolean

    Returns the value of the isAnonymousComponent record component.

    boolean

    Returns the value of the isReturnValue record component.

    com.github.javaparser.ast.body.VariableDeclarator

    Returns the value of the localVariableDeclarator record component.

    Returns the value of the localVariableName record component.

    com.github.javaparser.ast.expr.ObjectCreationExpr

    Returns the value of the objectCreationExpr record component.

    Returns the value of the rewriter record component.

    com.github.javaparser.ast.body.ConstructorDeclaration

    Returns the value of the routeConstructor record component.

    final String

    Returns a string representation of this record class.

    Class<? extends Component>

    Returns the value of the type record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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, Optional<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 a ComponentInfo record class.

      Parameters:

      type - the value for the type record component

      objectCreationExpr - the value for the objectCreationExpr record component

      componentCreateScope - the value for the componentCreateScope record component

      attachCall - the value for the attachCall record component

      componentAttachScope - the value for the componentAttachScope record component

      localVariableDeclarator - the value for the localVariableDeclarator record component

      assignmentExpression - the value for the assignmentExpression record component

      fieldDeclaration - the value for the fieldDeclaration record component

      fieldDeclarationAndAssignment - the value for the fieldDeclarationAndAssignment record component

      localVariableName - the value for the localVariableName record component

      fieldName - the value for the fieldName record component

      routeConstructor - the value for the routeConstructor record component

      containerComposite - the value for the containerComposite record component

      isAnonymousComponent - the value for the isAnonymousComponent record component

      isReturnValue - the value for the isReturnValue record component

      rewriter - the value for the rewriter record 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 component

      javaRewriter - JavaRewriter class of the given component.

      Returns:

      Component info if every argument is found well. Throws IllegalArgumentException for unknown statements.

    • getVariableDeclarator

      public com.github.javaparser.ast.body.VariableDeclarator getVariableDeclarator()

      Gets the variable declarator of the component, either for the local variable or field.

      Returns:

      the variable declarator of the component, or null if not found

    • toString

      public final String 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.

      Specified by:

      toString in class Record

      Returns:

      a string representation of this object

    • 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.

      Specified by:

      hashCode in class Record

      Returns:

      a hash code value for this object

    • equals

      public final boolean equals(Object o)

      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 with Objects::equals(Object,Object); primitive components are compared with '=='.

      Specified by:

      equals in class Record

      Parameters:

      o - the object with which to compare

      Returns:

      true if this object is the same as the o argument; false otherwise.

    • type

      public Class<? extends Component> type()

      Returns the value of the type record component.

      Returns:

      the value of the type record component

    • objectCreationExpr

      public com.github.javaparser.ast.expr.ObjectCreationExpr objectCreationExpr()

      Returns the value of the objectCreationExpr record component.

      Returns:

      the value of the objectCreationExpr record component

    • componentCreateScope

      public com.github.javaparser.ast.stmt.BlockStmt componentCreateScope()

      Returns the value of the componentCreateScope record component.

      Returns:

      the value of the componentCreateScope record component

    • attachCall

      public AttachExpression attachCall()

      Returns the value of the attachCall record component.

      Returns:

      the value of the attachCall record component

    • componentAttachScope

      public Optional<com.github.javaparser.ast.stmt.BlockStmt> componentAttachScope()

      Returns the value of the componentAttachScope record component.

      Returns:

      the value of the componentAttachScope record component

    • localVariableDeclarator

      public com.github.javaparser.ast.body.VariableDeclarator localVariableDeclarator()

      Returns the value of the localVariableDeclarator record component.

      Returns:

      the value of the localVariableDeclarator record component

    • assignmentExpression

      public com.github.javaparser.ast.expr.AssignExpr assignmentExpression()

      Returns the value of the assignmentExpression record component.

      Returns:

      the value of the assignmentExpression record component

    • fieldDeclaration

      public com.github.javaparser.ast.body.FieldDeclaration fieldDeclaration()

      Returns the value of the fieldDeclaration record component.

      Returns:

      the value of the fieldDeclaration record component

    • fieldDeclarationAndAssignment

      public com.github.javaparser.ast.body.FieldDeclaration fieldDeclarationAndAssignment()

      Returns the value of the fieldDeclarationAndAssignment record component.

      Returns:

      the value of the fieldDeclarationAndAssignment record component

    • localVariableName

      public String localVariableName()

      Returns the value of the localVariableName record component.

      Returns:

      the value of the localVariableName record component

    • fieldName

      public String fieldName()

      Returns the value of the fieldName record component.

      Returns:

      the value of the fieldName record component

    • routeConstructor

      public com.github.javaparser.ast.body.ConstructorDeclaration routeConstructor()

      Returns the value of the routeConstructor record component.

      Returns:

      the value of the routeConstructor record component

    • containerComposite

      public boolean containerComposite()

      Returns the value of the containerComposite record component.

      Returns:

      the value of the containerComposite record component

    • isAnonymousComponent

      public boolean isAnonymousComponent()

      Returns the value of the isAnonymousComponent record component.

      Returns:

      the value of the isAnonymousComponent record component

    • isReturnValue

      public boolean isReturnValue()

      Returns the value of the isReturnValue record component.

      Returns:

      the value of the isReturnValue record component

    • rewriter

      public JavaRewriter rewriter()

      Returns the value of the rewriter record component.

      Returns:

      the value of the rewriter record component