ArchUnit icon indicating copy to clipboard operation
ArchUnit copied to clipboard

add JavaRecordComponent

Open StefanGraeber opened this issue 3 months ago • 0 comments

JavaClass already has isRecord(), but it lacks getRecordComponents() including the returned type. The reflection equivalent was added in Java 16: https://docs.oracle.com/en//java/javase/16/docs/api/java.base/java/lang/Class.html#getRecordComponents()

The JavaRecordCompoent needs crosslinking with the owning JavaClass, the getter method and all 3 variants of getRawType, getType and getAnnotatedType (covering TYPE_USE annotations, see #1382 ) as well as annotation on itself with target RECORD_COMPONENT

StefanGraeber avatar Sep 01 '26 07:09 StefanGraeber