Package org.codehaus.groovy.transform
Record Class TupleConstructorASTTransformation.SelectedTupleProperties
java.lang.Object
java.lang.Record
org.codehaus.groovy.transform.TupleConstructorASTTransformation.SelectedTupleProperties
- Enclosing class:
- TupleConstructorASTTransformation
public static record TupleConstructorASTTransformation.SelectedTupleProperties(List<PropertyNode> superList, List<PropertyNode> list, List<PropertyNode> ordered)
extends Record
Result of
TupleConstructorASTTransformation.selectTupleProperties(org.codehaus.groovy.transform.AbstractASTTransformation, org.codehaus.groovy.ast.ClassNode, org.codehaus.groovy.ast.AnnotationNode): the super-class properties
and self properties that pass the annotation's filters
(includes / excludes / allNames / includeProperties / includeFields /
includeSuperProperties / includeSuperFields / allProperties).
superList and list are in source-declaration order
(with super first), suitable for body iteration that needs to know
super vs. self membership. ordered is the constructor
parameter order — concatenation of super + self with the
includes-attribute reordering applied if includes is
non-null.
Both the full transform's
TupleConstructorASTTransformation.createConstructor(AbstractASTTransformation, AnnotationNode, ClassNode, boolean, boolean, boolean, boolean, List, List, boolean, boolean, SourceUnit, PropertyHandler, ClosureExpression, ClosureExpression)
and TupleConstructorASTStubber consume the same selection so
the joint-compilation stub's constructor signature is a strict subset
of the runtime's, never a superset.
- Since:
- 6.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionSelectedTupleProperties(List<PropertyNode> superList, List<PropertyNode> list, List<PropertyNode> ordered) Creates an instance of aSelectedTuplePropertiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.list()Returns the value of thelistrecord component.ordered()Returns the value of theorderedrecord component.Returns the value of thesuperListrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SelectedTupleProperties
public SelectedTupleProperties(List<PropertyNode> superList, List<PropertyNode> list, List<PropertyNode> ordered) Creates an instance of aSelectedTuplePropertiesrecord class.- Parameters:
superList- the value for thesuperListrecord componentlist- the value for thelistrecord componentordered- the value for theorderedrecord 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). -
superList
Returns the value of thesuperListrecord component.- Returns:
- the value of the
superListrecord component
-
list
Returns the value of thelistrecord component.- Returns:
- the value of the
listrecord component
-
ordered
Returns the value of theorderedrecord component.- Returns:
- the value of the
orderedrecord component
-