38
38
import com .oracle .svm .hosted .FeatureImpl .DuringSetupAccessImpl ;
39
39
import com .oracle .svm .hosted .reflect .ReflectionDataBuilder ;
40
40
41
+ /**
42
+ * For annotations that are materialized at image run time, all necessary methods are registered for
43
+ * reflection in {@link ReflectionDataBuilder#registerTypesForAnnotation}. But if an annotation type
44
+ * is only used by an annotation that is already in the image heap, then we need to also register
45
+ * its methods for reflection. This is done here by registering a callback which notifies us for
46
+ * every reachable {@link Annotation} object in the heap and then checking if it is an annotation
47
+ * that was materialized by the JDK, i.e., it is a {@link Proxy}.
48
+ */
41
49
@ AutomaticallyRegisteredFeature
42
50
public class AnnotationFeature implements InternalFeature {
43
51
@@ -49,14 +57,6 @@ public void duringSetup(DuringSetupAccess a) {
49
57
access .registerObjectReachableCallback (Annotation .class , this ::registerDeclaredMethods );
50
58
}
51
59
52
- /**
53
- * For annotations that are materialized at image run time, all necessary methods are registered
54
- * for reflection in {@link ReflectionDataBuilder#registerTypesForAnnotation}. But if an
55
- * annotation type is only used by an annotation that is already in the image heap, then we need
56
- * to also register its methods for reflection. This is done here by registering a callback
57
- * which notifies us for every reachable {@link Annotation} object in the heap and then checking
58
- * if it is an annotation that was materialized by the JDK, i.e., it is a {@link Proxy}.
59
- */
60
60
@ SuppressWarnings ("unused" )
61
61
private void registerDeclaredMethods (DuringAnalysisAccess access , Annotation annotation , ObjectScanner .ScanReason reason ) {
62
62
if (Proxy .isProxyClass (annotation .getClass ())) {
0 commit comments