Package com.vaadin.copilot.allcomponents
Record Class AllComponentsComponentGeneratorContext
java.lang.Object
java.lang.Record
com.vaadin.copilot.allcomponents.AllComponentsComponentGeneratorContext
- Record Components:
target- the block to which generated statements are addedparentContainerVariableName- the variable name of the container receiving the componentcomponentClass- the component class being generatedcomponentVariableName- the generated component variable name, when one was created
public record AllComponentsComponentGeneratorContext(com.github.javaparser.ast.stmt.BlockStmt target, String parentContainerVariableName, Class<?> componentClass, Optional<String> componentVariableName)
extends Record
Supplies the generated-code context needed by a
AllComponentsComponentGenerator.-
Constructor Summary
ConstructorsConstructorDescriptionAllComponentsComponentGeneratorContext(com.github.javaparser.ast.stmt.BlockStmt target, String parentContainerVariableName, Class<?> componentClass, Optional<String> componentVariableName) Creates an instance of aAllComponentsComponentGeneratorContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionClass<?> Returns the value of thecomponentClassrecord component.Returns the value of thecomponentVariableNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theparentContainerVariableNamerecord component.com.github.javaparser.ast.stmt.BlockStmttarget()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AllComponentsComponentGeneratorContext
public AllComponentsComponentGeneratorContext(com.github.javaparser.ast.stmt.BlockStmt target, String parentContainerVariableName, Class<?> componentClass, Optional<String> componentVariableName) Creates an instance of aAllComponentsComponentGeneratorContextrecord class.- Parameters:
target- the value for thetargetrecord componentparentContainerVariableName- the value for theparentContainerVariableNamerecord componentcomponentClass- the value for thecomponentClassrecord componentcomponentVariableName- the value for thecomponentVariableNamerecord 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). -
target
public com.github.javaparser.ast.stmt.BlockStmt target()Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-
parentContainerVariableName
Returns the value of theparentContainerVariableNamerecord component.- Returns:
- the value of the
parentContainerVariableNamerecord component
-
componentClass
Returns the value of thecomponentClassrecord component.- Returns:
- the value of the
componentClassrecord component
-
componentVariableName
Returns the value of thecomponentVariableNamerecord component.- Returns:
- the value of the
componentVariableNamerecord component
-