@@ -607,7 +607,6 @@ private RecordComponentMetadata[] getRecordComponents(MetaAccessProvider metaAcc
607
607
String name = getRecordComponentName (recordComponent );
608
608
HostedType type = (HostedType ) metaAccess .lookupJavaType (getRecordComponentType (recordComponent ));
609
609
String signature = getRecordComponentSignature (recordComponent );
610
- Method accessor = getRecordComponentAccessor (recordComponent );
611
610
612
611
/* Fill encoders with the necessary values. */
613
612
encoders .sourceMethodNames .addObject (name );
@@ -616,13 +615,8 @@ private RecordComponentMetadata[] getRecordComponents(MetaAccessProvider metaAcc
616
615
/* Register string and class values in annotations */
617
616
AnnotationValue [] annotations = registerAnnotationValues (recordComponent );
618
617
TypeAnnotationValue [] typeAnnotations = registerTypeAnnotationValues (recordComponent );
619
- JavaConstant accessorConstant = null ;
620
- if (accessor != null ) {
621
- accessorConstant = SubstrateObjectConstant .forObject (accessor );
622
- encoders .objectConstants .addObject (accessorConstant );
623
- }
624
618
625
- metadata [i ] = new RecordComponentMetadata (declaringType , name , type , signature , accessorConstant , annotations , typeAnnotations );
619
+ metadata [i ] = new RecordComponentMetadata (declaringType , name , type , signature , annotations , typeAnnotations );
626
620
}
627
621
return metadata ;
628
622
}
@@ -640,7 +634,6 @@ private RecordComponentMetadata[] getRecordComponents(MetaAccessProvider metaAcc
640
634
private static final Method getRecordComponentName = (JavaVersionUtil .JAVA_SPEC >= 17 ) ? ReflectionUtil .lookupMethod (recordComponentClass , "getName" ) : null ;
641
635
private static final Method getRecordComponentType = (JavaVersionUtil .JAVA_SPEC >= 17 ) ? ReflectionUtil .lookupMethod (recordComponentClass , "getType" ) : null ;
642
636
private static final Method getRecordComponentSignature = (JavaVersionUtil .JAVA_SPEC >= 17 ) ? ReflectionUtil .lookupMethod (recordComponentClass , "getGenericSignature" ) : null ;
643
- private static final Method getRecordComponentAccessor = (JavaVersionUtil .JAVA_SPEC >= 17 ) ? ReflectionUtil .lookupMethod (recordComponentClass , "getAccessor" ) : null ;
644
637
645
638
private static String getRecordComponentName (Object recordComponent ) {
646
639
try {
@@ -666,14 +659,6 @@ private static String getRecordComponentSignature(Object recordComponent) {
666
659
}
667
660
}
668
661
669
- private static Method getRecordComponentAccessor (Object recordComponent ) {
670
- try {
671
- return (Method ) getRecordComponentAccessor .invoke (recordComponent );
672
- } catch (IllegalAccessException | InvocationTargetException e ) {
673
- throw VMError .shouldNotReachHere (e );
674
- }
675
- }
676
-
677
662
/**
678
663
* See {@link ReflectionMetadataDecoderImpl} for the encoding format description.
679
664
*/
@@ -986,7 +971,6 @@ private void encodeRecordComponent(UnsafeArrayTypeWriter buf, RecordComponentMet
986
971
encodeName (buf , recordComponent .name );
987
972
encodeType (buf , recordComponent .type );
988
973
encodeName (buf , recordComponent .signature );
989
- encodeObject (buf , recordComponent .accessor );
990
974
encodeByteArray (buf , encodeAnnotations (recordComponent .annotations ));
991
975
encodeByteArray (buf , encodeTypeAnnotations (recordComponent .typeAnnotations ));
992
976
}
0 commit comments