mbien commented on code in PR #7670:
URL: https://github.com/apache/netbeans/pull/7670#discussion_r1722523433
##########
java/java.source.base/apichanges.xml:
##########
@@ -25,6 +25,18 @@
<apidef name="javasource_base">Java Source API</apidef>
</apidefs>
<changes>
+ <change id="TreeMaker.RecordComponent">
+ <api name="javasource_base" />
+ <summary>Adding TreeMaker.RecordComponent</summary>
+ <version major="1" minor="2.70.0"/>
+ <date day="20" month="8" year="2023"/>
Review Comment:
check date
##########
java/java.source.base/src/org/netbeans/api/java/source/ElementUtilities.java:
##########
@@ -928,7 +929,143 @@ public ExecutableElement getDescriptorElement(TypeElement
origin) {
}
return null;
}
-
+
+ /**
+ * Find all elements that are linked record elements for the given input.
Will
+ * return the record component element, field, accessor method, and
canonical constructor
+ * parameters.
+ *
+ * This method can be called on any {@code Element}, and will return a
collection
+ * with a single entry if the provided element is not a record element.
+ *
+ * @param forElement for which the linked elements should be found
+ * @return a collection containing the provided element, plus any
additional elements
+ * that are linked to it by the Java record specification
+ * @since 2.70
+ */
+ public Collection<? extends Element> getLinkedRecordElements(Element
forElement) {
Review Comment:
great method!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists